UQTk: Uncertainty Quantification Toolkit 3.1.5
rosenblatt.h File Reference

Header for tools related to Rosenblatt transformation. More...

Go to the source code of this file.

Functions

void invRos (Array1D< double > &unif, Array2D< double > &xi, Array1D< double > &newXi, Array1D< double > &sig)
 Generates a new sample by inverse Rosenblatt defined by a given sample set (xi) and a 'uniform' sample from the unit hypercube.
 
void invRos (Array1D< double > &unif, Array2D< double > &xi, Array1D< double > &newXi, double bw)
 This is a version of invRos() with the same bandwidth (bw) for all dimensions.
 
void invRos (Array1D< double > &unif, Array2D< double > &xi, Array1D< double > &newXi)
 This is a version of invRos() with an automatic bandwidth selection based on a rule of thumb.
 
void invRos (Array2D< double > &unif, Array2D< double > &xi, Array2D< double > &newXi)
 This is a version of invRos() with an automatic bandwidth selection based on a rule of thumb, and operating on set of uniform samples (rather than one at a time)
 
void get_opt_KDEbdwth (const Array2D< double > &data, Array1D< double > &bdwth)
 Calculates 'rule of thumb' optimal KDE bandwidths for a multi-dimensional data.
 
void Rosen (Array2D< double > &xi, Array2D< double > &xi_data, Array2D< double > &unif, Array1D< double > &sig)
 Given input samples (xi), generates uniform samples by Rosenblatt map whose PDF is defined by a given sample set (xi_data)
 
void Rosen (Array2D< double > &xi, Array2D< double > &xi_data, Array2D< double > &unif, double bw)
 This is a version of Rosen() with the same bandwidth (bw) for all dimensions.
 
void Rosen (Array2D< double > &xi, Array2D< double > &xi_data, Array2D< double > &unif)
 This is a version of Rosen() with an automatic bandwidth selection based on a rule of thumb.
 

Detailed Description

Header for tools related to Rosenblatt transformation.

Function Documentation

◆ get_opt_KDEbdwth()

void get_opt_KDEbdwth ( const Array2D< double > & data,
Array1D< double > & bdwth )

Calculates 'rule of thumb' optimal KDE bandwidths for a multi-dimensional data.

Note
Employs Silverman's rule-of-thumb, with a homemade factor adjustment accounting for samples that are near boundaries
This rule-of-thumb is quite heuristic; use at your own risk
Parameters
[in]data: 2-dimensional array of size $N\times d$ corresponding to samples
[out]bdwth: 1-dimensional array of size $d$ for dimension-specific KDE bandwidths

◆ invRos() [1/4]

void invRos ( Array1D< double > & unif,
Array2D< double > & xi,
Array1D< double > & newXi )

This is a version of invRos() with an automatic bandwidth selection based on a rule of thumb.

Note
The rule of thumb is not always reliable. It is recommended to test various bandwidths.

◆ invRos() [2/4]

void invRos ( Array1D< double > & unif,
Array2D< double > & xi,
Array1D< double > & newXi,
Array1D< double > & sig )

Generates a new sample by inverse Rosenblatt defined by a given sample set (xi) and a 'uniform' sample from the unit hypercube.

Note
Performs inverse Rosenblatt map $\xi=R^{-1}(u)\in\mathbf{R}^d$ given a single sample of $u\in[0,1]^d$
The command line utility app/pce_quad uses this map; see UQTk Manual entry for the app for technical description of the map
Parameters
[in]unif: 1-dimensional array of size $d$ corresponding to a sample $u\in[0,1]^d$
[in]xi: 2-dimensional array of size $d\times M$ corresponding to samples that define the target distribution
[out]newXi: 1-dimensional array of size $d$ corresponding to a new sample $\xi=R^{-1}(u)\in\mathbf{R}^d$
[in]sig: 1-dimensional array of size $d$ for dimension-specific KDE bandwidths

◆ invRos() [3/4]

void invRos ( Array1D< double > & unif,
Array2D< double > & xi,
Array1D< double > & newXi,
double bw )

This is a version of invRos() with the same bandwidth (bw) for all dimensions.

◆ invRos() [4/4]

void invRos ( Array2D< double > & unif,
Array2D< double > & xi,
Array2D< double > & newXi )

This is a version of invRos() with an automatic bandwidth selection based on a rule of thumb, and operating on set of uniform samples (rather than one at a time)

Parameters
[in]unif: 2-dimensional array of size $N\times d$ corresponding to N samples $u\in[0,1]^d$ (uniform)
[in]xi: 2-dimensional array of size $d\times M$ corresponding to samples that define the arbitrary target distribution
[out]newXi: 2-dimensional array of size $N\times d$ corresponding to a set of N new samples $\xi=R^{-1}(u)\in\mathbf{R}^d$
Note
The rule of thumb is not always reliable. It is recommended to test various bandwidths.

◆ Rosen() [1/3]

void Rosen ( Array2D< double > & xi,
Array2D< double > & xi_data,
Array2D< double > & unif )

This is a version of Rosen() with an automatic bandwidth selection based on a rule of thumb.

Note
The rule of thumb is not always reliable. It is recommended to test various bandwidths.

◆ Rosen() [2/3]

void Rosen ( Array2D< double > & xi,
Array2D< double > & xi_data,
Array2D< double > & unif,
Array1D< double > & sig )

Given input samples (xi), generates uniform samples by Rosenblatt map whose PDF is defined by a given sample set (xi_data)

Note
Performs Rosenblatt map $u=R(\xi)$ given multiple samples of $\xi$
Parameters
[in]xi: 2-dimensional array of size $N\times d$ for input samples $\xi$ of the Rosenblatt map
[in]xi_data: 2-dimensional array of size $M\times d$ corresponding to samples $\xi_d$ from PDF defining the Rosenblatt map
[out]unif: 2-dimensional array of size $N\times d$ for output samples of the Rosenblatt map; will land in $[0,1]^d$ if the input $\xi$ is sampled from the PDF of $\xi_d$
[in]sig: 1-dimensional array of size $d$ for dimension-specific KDE bandwidths

◆ Rosen() [3/3]

void Rosen ( Array2D< double > & xi,
Array2D< double > & xi_data,
Array2D< double > & unif,
double bw )

This is a version of Rosen() with the same bandwidth (bw) for all dimensions.