- distributionsThe distribution names to be sampled, the number of distributions provided defines the number of columns per matrix.
C++ Type:std::vector<DistributionName>
Controllable:No
Description:The distribution names to be sampled, the number of distributions provided defines the number of columns per matrix.
- num_rowsThe size of the square matrix to generate.
C++ Type:unsigned long
Controllable:No
Description:The size of the square matrix to generate.
LatinHypercube
Latin Hypercube Sampler.
Overview
This sampler implements the Latin hypercube strategy presented in McKay et al. (1979) as:
If we wish to ensure also that each of the input variables has all portions of its distribution represented by input values, we can divide the range of each into strata of equal marginal probability , and sample once from each stratum. Let this sample be . These form the , component, , in . The components of the various 's are matched at random.
Example Input File Syntax
The following input file creates a Latin hypercube sample from two uniform distributions with 10 samples of each distribution.
[Distributions<<<{"href": "../../syntax/Distributions/index.html"}>>>]
[a]
type = Uniform<<<{"description": "Continuous uniform distribution.", "href": "../distributions/Uniform.html"}>>>
lower_bound<<<{"description": "Distribution lower bound"}>>> = 100
upper_bound<<<{"description": "Distribution upper bound"}>>> = 200
[]
[b]
type = Uniform<<<{"description": "Continuous uniform distribution.", "href": "../distributions/Uniform.html"}>>>
lower_bound<<<{"description": "Distribution lower bound"}>>> = 10
upper_bound<<<{"description": "Distribution upper bound"}>>> = 20
[]
[]
[Samplers<<<{"href": "../../syntax/Samplers/index.html"}>>>]
[sample]
type = LatinHypercube<<<{"description": "Latin Hypercube Sampler.", "href": "LatinHypercubeSampler.html"}>>>
distributions<<<{"description": "The distribution names to be sampled, the number of distributions provided defines the number of columns per matrix."}>>> = 'a b'
num_rows<<<{"description": "The size of the square matrix to generate."}>>> = 10
seed<<<{"description": "Random number generator initial seed"}>>> = 1980
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."}>>> = 'INITIAL TIMESTEP_END'
[]
[]
(moose/modules/stochastic_tools/test/tests/samplers/latin_hypercube/latin_hypercube.i)The graph in Figure 1 show the Latin hypercube sample generated from the input file snippet where the grid lines are defined with the associated probability based bins.
Figure 1: Latin hypercube sampled data with tick marks defined at the probability intervals.
Input 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
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
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
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
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
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
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.
- seed0Random number generator initial seed
Default:0
C++ Type:unsigned int
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>
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
References
- Michael D McKay, Richard J Beckman, and William J Conover.
Comparison of three methods for selecting values of input variables in the analysis of output from a computer code.
Technometrics, 21(2):239–245, 1979.[BibTeX]