Documentation Center

  • Trial Software
  • Product Updates

sdo.ParameterSpace class

Package: sdo

Specify probability distributions for model parameters

Description

Specify the probability distributions for model parameters, which define the parameter space. You use the sdo.ParameterSpace object as an input to the sdo.sample command and generate samples of the model parameters. The software generates these samples as per the distributions specified for each parameter. You evaluate the cost function for each of these samples using the sdo.evaluate command and analyze how the model parameters influence the cost function.

Construction

ps = sdo.ParameterSpace(p) creates an sdo.ParameterSpace object for the specified model parameters. The software assigns the parameter names to the ParameterNames property and default values to the remaining properties, including ParameterDistributions. The software specifies the uniform distribution for each parameter in p and sets the values of the two parameters of the uniform distribution as follows:

  • Lower — Set to p.Minimum. If p.Minimum is equal to -Inf, then the software sets Lower to 0.9*p.Value. Unless p.Value is equal to 0, in which case the software sets Lower to -1.

  • Upper — Set to p.Maximum. If p.Maximum is equal to Inf, then the software sets Upper to 1.1*p.Value. Unless p.Value is equal to 0, in which case the software sets Upper to 1.

ps = sdo.ParameterSpace(p,pdist) specifies the distribution of each parameter.

Input Arguments

p

Model parameters and states, specified as a vector of param.Continuous objects.

For example, sdo.getParameterFromModel('sdoHydraulicCylinder',{'Ac','K'}).

pdist

Probability distribution of model parameters, specified as a vector of univariate probability distribution objects.

  • If pdist is the same size as p, the software specifies each entry of pdist as the probability distribution of the corresponding parameter in p.

  • If pdist contains only one object, the software specifies this object as the probability distribution for all the parameters in p.

Use the makedist command to create a univariate probability distribution object. For example, makedist('Normal','mu',100,'sigma',10).

To check if pdist is a univariate distribution object, run isa(pdist,'prob.UnivariateDistribution').

Properties

ParameterNames

Model parameter names, specified as cell arrays of strings.

This property is ready only.

Default: ''

ParameterDistributions

Model parameter distributions, specified as a vector of prob.UnivariateDistribution objects.

By default, the software specifies a uniform distribution for the model parameters specified by p. For each parameter, the software sets the values of the two parameters of the uniform distribution:

  • Lower — Set to p.Minimum. If p.Minimum is equal to -Inf, then the software sets Lower to 0.9*p.Value. Unless p.Value is equal to 0, in which case the software sets Lower to -1.

  • Upper — Set to p.Maximum. If p.Maximum is equal to Inf, then the software sets Upper to 1.1*p.Value. Unless p.Value is equal to 0, in which case the software sets Upper to 1.

Use the pdist input argument when constructing ps to set the value of this property. Alternatively, use the sdo.ParameterSpace.setDistribution method after you have constructed ps.

Default: []

RankCorrelation

Correlation between parameters, specified as a matrix.

When you call sdo.sample, the software generates samples that are correlated as specified by this matrix (where the correlation refers to ranked correlation). You can specify the sampling method using the Method property of an sdo.SampleOptions.

  • If you specify Method as 'random' or 'lhs', the software uses the Iman-Conover algorithm to impose the correlation specified by RankCorrelation.

  • If you specify Method as 'copula', the software uses a copula to impose the correlation specified by RankCorrelation. Use the MethodOptions property of the sdo.SampleOptions object to specify the copula family.

Specify [] when the parameters are uncorrelated.

Default: []

Options

Sampling method options, specified as an sdo.SampleOptions object.

Default: sdo.SampleOptions

Notes

Text notes associated with ps, specified as a string or cell array of strings.

Default: ''

Methods

addParameterAdd parameter to sdo.ParameterSpace object
removeParameterRemove parameter from sdo.ParameterSpace object
setDistributionSet distribution of parameter in sdo.ParameterSpace object

Copy Semantics

Value. To learn how value classes affect copy operations, see Copying Objects in the MATLAB® documentation.

Examples

expand all

Specify Parameter Distributions for Sampling

Obtain the model parameters of interest.

load_system('sdoHydraulicCylinder');
p  = sdo.getParameterFromModel('sdoHydraulicCylinder',{'Ac','K'});

Construct an sdo.ParameterSpace object for Ac and K.

ps = sdo.ParameterSpace(p);

You can use ps as an input to sdo.sample and generate samples. By default, the software specifies a uniform distribution for both parameters.

Suppose you want to specify the normal distribution for Ac and the uniform distribution for K, with K in the [30000 70000] range.

pdistAc = makedist('Normal', 'mu',p(1).Value,'sigma',2);
pdistK = makedist('Uniform','lower',30000,'upper',70000);
ps1 = sdo.ParameterSpace(p,[pdistAc;pdistK]);

See Also

| | |

More About

Was this topic helpful?