PolynomialRegressionSurrogate

Evaluates polynomial regression model with coefficients computed from PolynomialRegressionTrainer.

Overview

This surrogate model takes the vector containing model coefficients () from PolynomialRegressionTrainer and computes the value of the QoI at a new parameter sample by simply evaluating

(1)

where denotes the coordinates of the new sample in the parameter space. It is important to mention that unlike NearestPointSurrogate, this surrogate model does not require the evaluation of a function (e.g. distance) for all training points to determine the new value at . Thus, for large training data bases, using a PolynomialRegressionSurrogate for repeated runs is faster.

Example Input File Syntax

To create a surrogate model which uses polynomial regression, one can use the following syntax:

[Surrogates<<<{"href": "../../syntax/Surrogates/index.html"}>>>]
  [surrogate]
    type = PolynomialRegressionSurrogate<<<{"description": "Evaluates polynomial regression model with coefficients computed from PolynomialRegressionTrainer.", "href": "PolynomialRegressionSurrogate.html"}>>>
    filename<<<{"description": "The name of the file which will be associated with the saved/loaded data."}>>> = 'train_out_train.rd'
  []
[]
(moose/modules/stochastic_tools/test/tests/surrogates/polynomial_regression/evaluate.i)

It is visible that the data from PolynomialRegressionTrainer has been saved to train_out_train.rd and the surrogate model is constructed by loading the necessary information from it. If one wants to do the training and evaluation in the same input, the following syntax can be used:

[Surrogates<<<{"href": "../../syntax/Surrogates/index.html"}>>>]
  [surrogate]
    type = PolynomialRegressionSurrogate<<<{"description": "Evaluates polynomial regression model with coefficients computed from PolynomialRegressionTrainer.", "href": "PolynomialRegressionSurrogate.html"}>>>
    trainer<<<{"description": "The SurrogateTrainer object. If this is specified the trainer data is automatically gathered and available in this SurrogateModel object."}>>> = train
  []
[]
(moose/modules/stochastic_tools/test/tests/surrogates/polynomial_regression/train_and_evaluate.i)

where train is the ID of the PolynomialRegressionTrainer object. For the sampling of the surrogate model, the same objects can be used in the Samplers block:

[Samplers<<<{"href": "../../syntax/Samplers/index.html"}>>>]
  [test]
    type = CartesianProduct<<<{"description": "Provides complete Cartesian product for the supplied variables.", "href": "../samplers/CartesianProductSampler.html"}>>>
    linear_space_items<<<{"description": "A list of triplets, each item should include the min, step size, and number of steps."}>>> = '0.25 1 10
                          0.25 1 10
                          0.25 1 10'
  []
[]
(moose/modules/stochastic_tools/test/tests/surrogates/polynomial_regression/evaluate.i)

Finally, a reporter of type EvaluateSurrogate is created to extract the approximate value of the QoI(s):

[Reporters<<<{"href": "../../syntax/Reporters/index.html"}>>>]
  [results]
    type = EvaluateSurrogate<<<{"description": "Tool for sampling surrogate models.", "href": "../reporters/EvaluateSurrogate.html"}>>>
    model<<<{"description": "Name of surrogate models."}>>> = surrogate
    sampler<<<{"description": "Sampler to use for evaluating surrogate models."}>>> = test
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = final
    parallel_type<<<{"description": "This parameter will determine how the stochastic data is gathered. It is common for outputting purposes that this parameter be set to ROOT, otherwise, many files will be produced showing the values on each processor. However, if there are lot of samples, gathering on root may be memory restrictive."}>>> = ROOT
  []
[]
(moose/modules/stochastic_tools/test/tests/surrogates/polynomial_regression/evaluate.i)

Input Parameters

  • filenameThe name of the file which will be associated with the saved/loaded data.

    C++ Type:FileName

    Controllable:No

    Description:The name of the file which will be associated with the saved/loaded data.

  • trainerThe SurrogateTrainer object. If this is specified the trainer data is automatically gathered and available in this SurrogateModel object.

    C++ Type:UserObjectName

    Controllable:No

    Description:The SurrogateTrainer object. If this is specified the trainer data is automatically gathered and available in this SurrogateModel object.

Optional Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Set the enabled status of the MooseObject.

Advanced Parameters