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.
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:
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.
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 componenti
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 componenti
. 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 componenti
and componentj
Default:weights_correlation = (d, d)
array with all elements equal to \(1\).A list of booleans declaring the properties to be matched in the reduced order model.
properties[0] = True
matches the marginal distributionsproperties[1] = True
matches the mean valuesproperties[2] = True
matches the mean squareproperties[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, therun()
method is automatically called when theSROM
object is defined. The user may also call therun()
method directly to generate samples. Therun()
method of theSROM
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 componenti
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 componenti
. 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 componenti
and componentj
Default:weights_correlation = (d, d)
array with all elements equal to \(1\).A list of booleans declaring the properties to be matched in the reduced order model.
properties[0] = True
matches the marginal distributionsproperties[1] = True
matches the mean valuesproperties[2] = True
matches the mean squareproperties[3] = True
matches the correlation