Main Content

sdo.analyze

Analyze how model parameters influence cost function

Description

example

r = sdo.analyze(x,y) returns an Np-by-Nc table containing the pairwise linear correlation coefficients between each pair of columns in the x and y tables. x contains Ns samples of Np model parameters. y contains Ns rows, each row corresponds to the cost function evaluation for a sample in x. Each column in y corresponds to a cost or constraint.

r = sdo.analyze(x,y,opts) specifies the analysis method(s) and method options using opts, an sdo.AnalyzeOptions object. If you specify multiple analysis methods, r is returned as a structure with fields for the results of each specified analysis method and method option combination.

Examples

collapse all

Create arbitrary param.Continuous objects.

p1 = param.Continuous('x1',1);
p2 = param.Continuous('x2',1500);
p = [p1;p2];

Specify the parameter space definition for the parameters.

ps = sdo.ParameterSpace(p);

Sample the parameters.

x = sdo.sample(ps,50);

Evaluate the cost function for the samples.

y = sdo.evaluate(@(p) sdoExampleCostFunction(p),ps,x);
Model evaluated at 50 samples.

Obtain the pairwise linear correlation coefficients for the parameters and the cost function.

r = sdo.analyze(x,y);

Create arbitrary param.Continuous objects.

p1 = param.Continuous('x1',1);
p2 = param.Continuous('x2',1500);
p = [p1;p2];

Specify the parameter space definition for the parameters.

ps = sdo.ParameterSpace(p);

Sample the parameters.

x = sdo.sample(ps,50);

Evaluate the cost function for the samples.

y = sdo.evaluate(@(p) sdoExampleCostFunction(p),ps,x);
Model evaluated at 50 samples.

Create an options object to use Correlation Method.

opt = sdo.AnalyzeOptions;
opt.Method = 'Correlation';

Obtain the pairwise linear correlation coefficients for the parameters and the cost function.

r = sdo.analyze(x,y,opt)
r=2×3 table
             F         Cleq        leq   
          ________    _______    ________

    x1      0.9997    -0.9997           1
    x2    -0.35144    0.35324    -0.35244

r is a structure with table fields, with one table for each type of analysis specified by opt.

Input Arguments

collapse all

Model parameter samples, specified as an Ns-by-Np table.

Ns is the number of samples, and Np is the number of model parameters.

Generally, you use sdo.sample to generate x.

Cost function and constraint evaluations for each sample in x, specified as an Ns-by-Nc table.

Ns is the number of samples, and Nc is the number of cost and constraints returned by the cost function.

Generally, you use sdo.evaluate to generate y.

Analysis options, specified as an sdo.AnalyzeOptions object.

Output Arguments

collapse all

Analysis results, returned as a table (when you specify a single analysis method) or a structure with table fields (when you specify multiple analysis methods).

Each table returned by r is an Np-by-Nc table. Np is the number of parameters, and Nc is the number of cost and constraints returned by the cost function.

Version History

Introduced in R2014a