- modelName of surrogate models.
C++ Type:std::vector<UserObjectName>
Description:Name of surrogate models.
- samplerSampler to use for evaluating surrogate models.
C++ Type:SamplerName
Description:Sampler to use for evaluating surrogate models.
EvaluateSurrogate
Tool for sampling surrogate models.
Overview
The EvaluateSurrogate object takes in a sampler and surrogate models and executes the evaluate
method within each surrogate for each row of the sampler. See Creating a Surrogate Model, Training a Surrogate Model, and Evaluating a Surrogate Model for more information regarding surrogate modeling.
For convenience, the parameter "output_samples" is included so that the values from the sampler are included in the output. Beware that setting this parameter to true can cause a large data output.
Example Syntax
Simple example using SurrogateEvaluate
[StochasticTools]
[]
[Samplers]
[test]
type = CartesianProduct
linear_space_items = '0.25 1 10
0.25 1 10
0.25 1 10'
[]
[]
[VectorPostprocessors]
[results]
type = EvaluateSurrogate
model = surrogate
sampler = test
execute_on = final
[]
[]
[Surrogates]
[surrogate]
type = NearestPointSurrogate
filename = 'train_out_train.rd'
[]
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(modules/stochastic_tools/test/tests/surrogates/nearest_point/evaluate.i)CSV output when output_samples = false
surrogate
8
8
24
40
56
72
88
104
120
136
...
CSV output when output_samples = true
surrogate,sample_p0,sample_p1,sample_p2
8,0.25,0.25,0.25
8,0.25,0.25,1.25
24,0.25,0.25,2.25
40,0.25,0.25,3.25
56,0.25,0.25,4.25
72,0.25,0.25,5.25
88,0.25,0.25,6.25
104,0.25,0.25,7.25
120,0.25,0.25,8.25
136,0.25,0.25,9.25
...
Input Parameters
- contains_complete_historyFalseSet this flag to indicate that the values in all vectors declared by this VPP represent a time history (e.g. with each invocation, new values are added and old values are never removed). This changes the output so that only a single file is output and updated with each invocation
Default:False
C++ Type:bool
Description:Set this flag to indicate that the values in all vectors declared by this VPP represent a time history (e.g. with each invocation, new values are added and old values are never removed). This changes the output so that only a single file is output and updated with each invocation
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, FINAL, CUSTOM.
- output_samplesFalseTrue to output value of parameter values from samples (this may be VERY large).
Default:False
C++ Type:bool
Description:True to output value of parameter values from samples (this may be VERY large).
- parallel_typeREPLICATEDSet how the data is represented within the VectorPostprocessor (VPP); 'distributed' indicates that data within the VPP is distributed and no auto communication is preformed, this setting will result in parallel output within the CSV output; 'replicated' indicates that the data within the VPP is correct on processor 0, the data will automatically be broadcast to all processors unless the '_auto_broadcast' param is set to false within the validParams function.
Default:REPLICATED
C++ Type:MooseEnum
Description:Set how the data is represented within the VectorPostprocessor (VPP); 'distributed' indicates that data within the VPP is distributed and no auto communication is preformed, this setting will result in parallel output within the CSV output; 'replicated' indicates that the data within the VPP is correct on processor 0, the data will automatically be broadcast to all processors unless the '_auto_broadcast' param is set to false within the validParams function.
Optional Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Description:Set the enabled status of the MooseObject.
- force_preauxFalseForces the GeneralUserObject to be executed in PREAUX
Default:False
C++ Type:bool
Description:Forces the GeneralUserObject to be executed in PREAUX
- force_preicFalseForces the GeneralUserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Description:Forces the GeneralUserObject to be executed in PREIC during initial setup
- outputsVector of output names were you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Description:Vector of output names were you would like to restrict the output of variables(s) associated with this object
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
Input Files
- (modules/stochastic_tools/test/tests/surrogates/polynomial_regression/train_and_evaluate.i)
- (modules/stochastic_tools/examples/surrogates/nearest_point_normal.i)
- (modules/stochastic_tools/examples/surrogates/poly_chaos_uniform.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/master_2d_quad.i)
- (modules/stochastic_tools/examples/surrogates/polynomial_regression/uniform_surr.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/GP_normal.i)
- (modules/stochastic_tools/test/tests/surrogates/nearest_point/predictor_response.i)
- (modules/stochastic_tools/examples/surrogates/poly_chaos_normal.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/master_2d_mc.i)
- (modules/stochastic_tools/test/tests/surrogates/nearest_point/cartesian.i)
- (modules/stochastic_tools/test/tests/surrogates/polynomial_regression/evaluate.i)
- (modules/combined/examples/stochastic/poly_chaos_uniform.i)
- (modules/stochastic_tools/examples/surrogates/nearest_point_uniform.i)
- (modules/stochastic_tools/examples/surrogates/combined/trans_diff_2d/trans_diff_surr.i)
- (modules/stochastic_tools/test/tests/surrogates/nearest_point/evaluate.i)
- (modules/stochastic_tools/examples/surrogates/polynomial_regression/normal_surr.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/master_2dnorm_quad.i)