ActiveLearningMonteCarloSampler

Monte Carlo Sampler for active learning with surrogate model.

Description

The ActiveLearningMonteCarloSampler facilitates the following tasks:

  • Propose random samples from distributions

    For each transient step, ActiveLearningMonteCarloSampler, by default, proposes a user-specified batch of sample inputs using the objects defined in the Distributions block.

  • Bookkeeping samples whose surrogate output is poor With the set of new input samples proposed, a trained surrogate model predicts the model outputs and also assess the quality of its own outputs. This prediction and quality assessment is done in the ActiveLearningGPDecision Reporter class. ActiveLearningMonteCarloSampler takes information from this Reporter class and keeps a record of the input samples for which the surrogate predictions are poor.

  • Launch batch of model evaluations in parallel

    Once the number of input samples for which the surrogate predictions are poor equals or exceeds a user specified limit, as indicated by the parameter num_batch, the corresponding full model evaluations to these input samples are launched through the SamplerFullSolveMultiApp. The advantage of launching these models in a batch mode is that parallel computing can be efficiently utilized. Therefore, this workflow permits what is called as "parallelized active learning."

Interaction between ActiveLearningMonteCarloSampler, ActiveLearningGaussianProcess, and ActiveLearningGPDecision

Figure 1: Schematic of active learning in Monte Carlo simulations with parallel computing. The interaction between the three objects, ActiveLearningMonteCarloSampler, ActiveLearningGaussianProcess, and ActiveLearningGPDecision, is presented.

Usage of active learning

Please refer to ActiveLearningGPDecision on a detailed description on using active learning.

Input Parameters

  • distributionsThe distribution names to be sampled, the number of distributions provided defines the number of columns per matrix.

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

    Unit:(no unit assumed)

    Controllable:No

    Description:The distribution names to be sampled, the number of distributions provided defines the number of columns per matrix.

  • flag_sampleFlag samples if the surrogate prediction was inadequate.

    C++ Type:ReporterName

    Unit:(no unit assumed)

    Controllable:No

    Description:Flag samples if the surrogate prediction was inadequate.

  • num_batchThe number of full model evaluations in the batch.

    C++ Type:unsigned long

    Unit:(no unit assumed)

    Controllable:No

    Description:The number of full model evaluations in the batch.

  • num_samplesNumber of samples to use (the total number of steps taken will be equal to this number + the number of re-training steps).

    C++ Type:int

    Unit:(no unit assumed)

    Controllable:No

    Description:Number of samples to use (the total number of steps taken will be equal to this number + the number of re-training steps).

Required Parameters

  • execute_onLINEARThe 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.

    Default:LINEAR

    C++ Type:ExecFlagEnum

    Unit:(no unit assumed)

    Options:NONE, INITIAL, LINEAR, NONLINEAR_CONVERGENCE, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, PRE_MULTIAPP_SETUP

    Controllable:No

    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.

  • limit_get_global_samples429496729The maximum allowed number of items in the DenseMatrix returned by getGlobalSamples method.

    Default:429496729

    C++ Type:unsigned long

    Unit:(no unit assumed)

    Controllable:No

    Description:The maximum allowed number of items in the DenseMatrix returned by getGlobalSamples method.

  • limit_get_local_samples429496729The maximum allowed number of items in the DenseMatrix returned by getLocalSamples method.

    Default:429496729

    C++ Type:unsigned long

    Unit:(no unit assumed)

    Controllable:No

    Description:The maximum allowed number of items in the DenseMatrix returned by getLocalSamples method.

  • limit_get_next_local_row429496729The maximum allowed number of items in the std::vector returned by getNextLocalRow method.

    Default:429496729

    C++ Type:unsigned long

    Unit:(no unit assumed)

    Controllable:No

    Description:The maximum allowed number of items in the std::vector returned by getNextLocalRow method.

  • max_procs_per_row4294967295This will ensure that the sampler is partitioned properly when 'MultiApp/*/max_procs_per_app' is specified. It is not recommended to use otherwise.

    Default:4294967295

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:This will ensure that the sampler is partitioned properly when 'MultiApp/*/max_procs_per_app' is specified. It is not recommended to use otherwise.

  • min_procs_per_row1This will ensure that the sampler is partitioned properly when 'MultiApp/*/min_procs_per_app' is specified. It is not recommended to use otherwise.

    Default:1

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:This will ensure that the sampler is partitioned properly when 'MultiApp/*/min_procs_per_app' is specified. It is not recommended to use otherwise.

  • num_random_seeds100000Initialize a certain number of random seeds. Change from the default only if you have to.

    Default:100000

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:Initialize a certain number of random seeds. Change from the default only if you have to.

  • seed0Random number generator initial seed

    Default:0

    C++ Type:unsigned int

    Unit:(no unit assumed)

    Controllable:No

    Description:Random number generator initial seed

Optional Parameters

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

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

    Unit:(no unit assumed)

    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

    Unit:(no unit assumed)

    Controllable:No

    Description:Set the enabled status of the MooseObject.

Advanced Parameters