Stochatic Reduced Order Models - SROMs

A SROM is a sample-based surrogate for probability models. An SROM takes a set of samples and attributes of a distribution and optimizes the sample probability weights according to the method in [57]. More specifically, an SROM constructs a reduce order model for arbitrary random variables X as follows.

\[\begin{split}\tilde{X} = \begin{cases} x_1 & probability \text{ }p_1^{(opt)} \\ & \vdots \\ x_m & probability \text{ }p_m^{(opt)} \end{cases}\end{split}\]

where \(\tilde{X}\) is defined by an arbitrary set of samples \(x_1, \dots, x_m\) defined over the same support as \(X\) (but not necessarily drawn from its probability distribution) and their assigned probability weights. The probability weights are defined such that the total error between the sample empirical probability distribution, moments and correlation of \(\tilde{X}\) and those of the random variable X is minimized. This optimization problem can be express as:

\[\begin{split}& \min_{\mathbf{p}} \sum_{u=1}^3 \alpha_u e_u(\mathbf{p}) \\ & \text{s.t.} \sum_{k=1}^m p_k =1 \quad and \quad p_k \geq 0, \quad k=1,2,\dots,m\end{split}\]

where \(\alpha_1\), \(\alpha_2\), \(\alpha_3 \geq 0\) are constants defining the relative importance of the marginal distribution, moments and correlation error between the reduce order model and actual random variables in the objective function.

\[\begin{split}& e_{1}(p)=\sum\limits_{i=1}^d \sum\limits_{k=1}^m w_{F}(x_{k,i};i)(\hat{F}_{i}(x_{k,i})-F_{i}(x_{k,i}))^2 \\ & e_{2}(p)=\sum\limits_{i=1}^d \sum\limits_{r=1}^2 w_{\mu}(r;i)(\hat{\mu}(r;i)-\mu(r;i))^2 \\ & e_{3}(p)=\sum\limits_{i,j=1,...,d ; j>i} w_{R}(i,j)(\hat{R}(i,j)-R(i,j))^2\end{split}\]

Here, \(F(x_{k,i})\) and \(\hat{F}(x_{k,i})\) denote the marginal cumulative distributions of \(\mathbf{X}\) and \(\mathbf{\tilde{X}}\) (reduced order model) evaluated at point \(x_{k,i}\), \(\mu(r; i)\) and \(\hat{\mu}(r; i)\) are the marginal moments of order r for variable i, and \(R(i,j)\) and \(\hat{R}(i,j)\) are correlation matrices of \(\mathbf{X}\) and \(\mathbf{\tilde{X}}\) evaluted for components \(x_i\) and \(x_j\). Note also that m is the number of sample points and d is the number of random variables.

SROM Class

The SROM class is imported using the following command:

>>> from UQpy.surrogates.stochastic_reduced_order_models.SROM import SROM

Methods

class SROM(samples, target_distributions, moments=None, weights_errors=None, weights_distribution=None, weights_moments=None, weights_correlation=None, properties=None, correlation=None)[source]

Stochastic Reduced Order Model(stochastic_reduced_order_models) provide a low-dimensional, discrete approximation of a given random quantity.

Parameters:
  • samples (Union[list, ndarray]) – An array/list of samples corresponding to the points at which the stochastic_reduced_order_models is defined.

  • target_distributions (list[Distribution]) – A list of distribution objects for each random variable.

  • moments (Optional[list]) – A list containing first and second order moment about origin of all random variables.

  • weights_errors (Optional[list]) – A list of weights associated with the error in distribution, moments and correlation. This corresponds to a list of the values \(a_{u}\) in the objective function above. Default: weights_errors = \([1, 0.2, 0]\)

  • weights_distribution (Union[ndarray, list, None]) – A list or array containing weights associated with matching the distribution at each sample value. weights_distribution is an array or list of shape (m, d) where each weight corresponds to the weight \(w_F(x_{k,i}; i)\) assigned for matching the distribution of component i at sample point \(x_{k,i}\). If weights_distribution is (1, d), it is assumed that each sample is equally weighted according to the corresponding weight for its distribution. Default: An array of shape (m, d) with all elements equal to \(1\).

  • weights_moments (Optional[list]) – An list or array containing weights associated with matching the moments about the origin for each component. weights_moments is a list or array of shape (2, d), where each weight corresponds to the weight :math:`w_{mu}(r; i) assigned for matching the moment of order \(r = 1, 2\) for component i. If weights_moments is (1, d), it is assumed that moments of all order are equally weighted. Default: weights_moments = [[1/(moment[0][i]^2)], [1/(moment[1][i]^2)]] for i = 1, 2, ..., d.

  • weights_correlation (Optional[ndarray]) – A list or array containing weights associated with matching the correlation of the random variables. weights_correlation is a list or array of shape (d, d) where each weight corresponds to the weight \(w_R(i, j)\) assigned for matching the correlation between component i and component j Default: weights_correlation = (d, d) array with all elements equal to \(1\).

  • properties (Optional[list]) –

    A list of booleans declaring the properties to be matched in the reduced order model.

    • properties[0] = True matches the marginal distributions

    • properties[1] = True matches the mean values

    • properties[2] = True matches the mean square

    • properties[3] = True matches the correlation

  • correlation (Optional[ndarray]) – Correlation matrix between random variables.

run(weights_errors=None, weights_distribution=None, weights_moments=None, weights_correlation=None, properties=None)[source]

Execute the stochastic reduced order model in the SROM class.

The run() method is the function that computes the probability weights corresponding to the sample. If properties is provided, the run() method is automatically called when the SROM object is defined. The user may also call the run() method directly to generate samples. The run() method of the SROM class can be invoked many times with different weights parameters and each time computed probability weights are overwritten.

Parameters:
  • weights_errors (Optional[list]) – A list of weights associated with the error in distribution, moments and correlation. This corresponds to a list of the values \(a_{u}\) in the objective function above. Default: weights_errors = \([1, 0.2, 0]\)

  • weights_distribution (Optional[list]) – A list or array containing weights associated with matching the distribution at each sample value. weights_distribution is an array or list of shape (m, d) where each weight corresponds to the weight \(w_F(x_{k,i}; i)\) assigned for matching the distribution of component i at sample point \(x_{k,i}\). If weights_distribution is (1, d), it is assumed that each sample is equally weighted according to the corresponding weight for its distribution. Default: An array of shape (m, d) with all elements equal to \(1\).

  • weights_moments (Optional[list]) – An list or array containing weights associated with matching the moments about the origin for each component. weights_moments is a list or array of shape (2, d), where each weight corresponds to the weight \(w_{\mu}(r; i)\) assigned for matching the moment of order \(r = 1, 2\) for component i. If weights_moments is (1, d), it is assumed that moments of all order are equally weighted. Default: weights_moments = [[1/(moment[0][i]^2)], [1/(moment[1][i]^2)]] for i = 1, 2, ..., d.

  • weights_correlation (Optional[list]) – A list or array containing weights associated with matching the correlation of the random variables. weights_correlation is a list or array of shape (d, d) where each weight corresponds to the weight \(w_R(i, j)\) assigned for matching the correlation between component i and component j Default: weights_correlation = (d, d) array with all elements equal to \(1\).

  • properties (Optional[list]) –

    A list of booleans declaring the properties to be matched in the reduced order model.

    • properties[0] = True matches the marginal distributions

    • properties[1] = True matches the mean values

    • properties[2] = True matches the mean square

    • properties[3] = True matches the correlation

Attributes

SROM.sample_weights: ndarray

The probability weights defining discrete approximation of continuous random variables.

Examples