- meanMean (or expectation) of the distribution.
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Mean (or expectation) of the distribution.
- standard_deviationStandard deviation of the distribution
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Standard deviation of the distribution
Normal
Normal distribution
Description
The normal (or Gaussian) distribution object defines a normal distribution function with the provided mean
and standard_deviation
parameters. The probability density function (PDF) of the normal distribution is given by the Eq. (1).
where μ is the mean and σ is the standard deviation (σ>0) of the distribution.
This implementation of a normal distribution uses a numerical approximation described in Kennedy and Gentle (2018).
Example Input Syntax
The following input file defines a normal distribution with a mean of 0 and a standard deviation of 1.
[Distributions]
[normal_test]
type = Normal
mean = 0
standard_deviation = 1
[]
[]
Input 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
Input Files
- (modules/stochastic_tools/examples/surrogates/poly_chaos_normal_mc.i)
- (modules/stochastic_tools/test/tests/samplers/ParallelSubsetSimulation/pss_error1.i)
- (modules/stochastic_tools/test/tests/samplers/ParallelSubsetSimulation/pss.i)
- (modules/stochastic_tools/test/tests/distributions/normal.i)
- (modules/stochastic_tools/test/tests/reporters/bootstrap_statistics/percentile/percentile_main.i)
- (modules/stochastic_tools/test/tests/reporters/bootstrap_statistics/bca/bca_main.i)
- (modules/stochastic_tools/test/tests/surrogates/multioutput_gp/mogp_lmc.i)
- (modules/stochastic_tools/examples/surrogates/nearest_point_normal.i)
- (modules/stochastic_tools/test/tests/samplers/mcmc/main_base.i)
- (modules/stochastic_tools/test/tests/samplers/mcmc/main_ss.i)
- (modules/stochastic_tools/test/tests/likelihoods/gaussian_derived/main.i)
- (modules/stochastic_tools/test/tests/surrogates/cross_validation/poly_reg_vec.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2dnorm_quad_moment.i)
- (modules/stochastic_tools/examples/workshop/step03.i)
- (modules/stochastic_tools/test/tests/surrogates/multioutput_gp/mogp_lmc_load.i)
- (modules/stochastic_tools/test/tests/samplers/mcmc/main_des.i)
- (modules/stochastic_tools/examples/parameter_study/nonlin_diff_react/nonlin_diff_react_parent_normal.i)
- (modules/stochastic_tools/test/tests/surrogates/polynomial_regression/poly_reg_vec.i)
- (modules/stochastic_tools/examples/surrogates/polynomial_regression/normal_surr.i)
- (modules/stochastic_tools/examples/surrogates/poly_chaos_normal_quad.i)
- (modules/stochastic_tools/test/tests/surrogates/multioutput_gp/mogp_lmc_tuned.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2dnorm_quad.i)
- (modules/stochastic_tools/test/tests/samplers/AdaptiveImportanceSampler/ais.i)
- (modules/stochastic_tools/test/tests/samplers/mcmc/main_imh.i)
- (modules/stochastic_tools/examples/parameter_study/main.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2dnorm_quad_locs.i)
- (modules/stochastic_tools/test/tests/surrogates/nearest_point/np_vec.i)
- (modules/stochastic_tools/test/tests/reporters/AISActiveLearning/ais_al.i)
- (modules/stochastic_tools/examples/workshop/step01.i)
- (modules/stochastic_tools/test/tests/distributions/normal_direct.i)
- (modules/stochastic_tools/test/tests/samplers/mcmc/main_des_var.i)
- (modules/stochastic_tools/examples/sobol/main.i)
- (modules/stochastic_tools/examples/surrogates/polynomial_regression/normal_train.i)
- (modules/stochastic_tools/examples/workshop/step04.i)
- (modules/stochastic_tools/examples/parameter_study/main_time.i)
- (modules/stochastic_tools/examples/workshop/step02.i)
- (modules/stochastic_tools/examples/parameter_study/main_vector.i)
- (modules/stochastic_tools/examples/surrogates/poly_chaos_normal.i)
Child Objects
References
- William J Kennedy and James E Gentle.
Statistical computing.
Routledge, 2018.[BibTeX]
@book{kennedy2018statistical, author = "Kennedy, William J and Gentle, James E", title = "Statistical computing", year = "2018", publisher = "Routledge" }
(modules/stochastic_tools/test/tests/distributions/normal.i)
[StochasticTools]
[]
[Distributions]
[normal_test]
type = Normal
mean = 0
standard_deviation = 1
[]
[]
[Postprocessors]
[cdf]
type = TestDistributionPostprocessor
distribution = normal_test
value = 0
method = cdf
execute_on = initial
[]
[pdf]
type = TestDistributionPostprocessor
distribution = normal_test
value = 0
method = pdf
execute_on = initial
[]
[quantile]
type = TestDistributionPostprocessor
distribution = normal_test
value = 0.5
method = quantile
execute_on = initial
[]
[]
[Outputs]
execute_on = 'INITIAL'
csv = true
[]
(modules/stochastic_tools/examples/surrogates/poly_chaos_normal_mc.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[q_dist]
type = Normal
mean = 10000
standard_deviation = 500
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[Tinf_dist]
type = Normal
mean = 300
standard_deviation = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 10000
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = results
from_reporter = 'avg/value max/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[]
[Trainers]
[poly_chaos_avg]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 10
regression_type = integration
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = sample
response = results/data:avg:value
[]
[poly_chaos_max]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 10
regression_type = integration
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = sample
response = results/data:max:value
[]
[]
[Outputs]
file_base = poly_chaos_training
[out]
type = SurrogateTrainerOutput
trainers = 'poly_chaos_avg poly_chaos_max'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/samplers/ParallelSubsetSimulation/pss_error1.i)
[StochasticTools]
[]
[Distributions]
[mu1]
type = Normal
mean = 0.0
standard_deviation = 0.5
[]
[mu2]
type = Normal
mean = 1
standard_deviation = 0.5
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 1
distributions = 'mu1 mu2'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
[]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Reporters]
[constant]
type = StochasticReporter
outputs = none
[]
[adaptive_MC]
type = AdaptiveMonteCarloDecision
output_value = constant/reporter_transfer:average:value
inputs = 'inputs'
sampler = sample
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
[out]
type = JSON
[]
[]
(modules/stochastic_tools/test/tests/samplers/ParallelSubsetSimulation/pss.i)
[StochasticTools]
[]
[Distributions]
[mu1]
type = Normal
mean = 0.0
standard_deviation = 0.5
[]
[mu2]
type = Normal
mean = 1
standard_deviation = 0.5
[]
[]
[Samplers]
[sample]
type = ParallelSubsetSimulation
distributions = 'mu1 mu2'
num_samplessub = 20
num_subsets = 6
num_parallel_chains = 2
output_reporter = 'constant/reporter_transfer:average:value'
inputs_reporter = 'adaptive_MC/inputs'
seed = 1012
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
[]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Reporters]
[constant]
type = StochasticReporter
outputs = none
[]
[adaptive_MC]
type = AdaptiveMonteCarloDecision
output_value = constant/reporter_transfer:average:value
inputs = 'inputs'
sampler = sample
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
[out]
type = JSON
execute_system_information_on = none
[]
[]
(modules/stochastic_tools/test/tests/distributions/normal.i)
[StochasticTools]
[]
[Distributions]
[normal_test]
type = Normal
mean = 0
standard_deviation = 1
[]
[]
[Postprocessors]
[cdf]
type = TestDistributionPostprocessor
distribution = normal_test
value = 0
method = cdf
execute_on = initial
[]
[pdf]
type = TestDistributionPostprocessor
distribution = normal_test
value = 0
method = pdf
execute_on = initial
[]
[quantile]
type = TestDistributionPostprocessor
distribution = normal_test
value = 0.5
method = quantile
execute_on = initial
[]
[]
[Outputs]
execute_on = 'INITIAL'
csv = true
[]
(modules/stochastic_tools/test/tests/reporters/bootstrap_statistics/percentile/percentile_main.i)
[StochasticTools]
[]
[Distributions]
[n0]
type = Normal
mean = 0
standard_deviation = 1
[]
[n1]
type = Normal
mean = 1
standard_deviation = 1
[]
[n2]
type = Normal
mean = 2
standard_deviation = 0.5
[]
[n3]
type = Normal
mean = 3
standard_deviation = 0.33333333333
[]
[n4]
type = Normal
mean = 4
standard_deviation = 0.25
[]
[]
[Samplers/sample]
type = MonteCarlo
distributions = 'n0 n1 n2 n3 n4'
num_rows = 100
execute_on = PRE_MULTIAPP_SETUP
[]
[GlobalParams]
sampler = sample
[]
[MultiApps/sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
mode = batch-reset
[]
[Controls/param]
type = MultiAppSamplerControl
multi_app = sub
param_names = 'Reporters/const/real_vector_values[0,1,2,3,4]'
[]
[Transfers/data]
type = SamplerReporterTransfer
from_multi_app = sub
from_reporter = 'const/num_vec'
stochastic_reporter = storage
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = none
[]
[stats]
type = StatisticsReporter
reporters = storage/data:const:num_vec
compute = 'mean stddev'
ci_method = 'percentile'
ci_levels = '0.025 0.05 0.1 0.16 0.5 0.84 0.9 0.95 0.975'
ci_replicates = 10000
ci_seed = 1945
execute_on = FINAL
[]
[]
[Outputs]
execute_on = FINAL
[out]
type = JSON
[]
[]
(modules/stochastic_tools/test/tests/reporters/bootstrap_statistics/bca/bca_main.i)
[StochasticTools]
[]
[Distributions]
[n0]
type = Normal
mean = 0
standard_deviation = 1
[]
[n1]
type = Normal
mean = 1
standard_deviation = 1
[]
[n2]
type = Normal
mean = 2
standard_deviation = 0.5
[]
[n3]
type = Normal
mean = 3
standard_deviation = 0.33333333333
[]
[n4]
type = Normal
mean = 4
standard_deviation = 0.25
[]
[]
[Samplers/sample]
type = MonteCarlo
distributions = 'n0 n1 n2 n3 n4'
num_rows = 100
execute_on = PRE_MULTIAPP_SETUP
[]
[GlobalParams]
sampler = sample
[]
[MultiApps/sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
mode = batch-reset
[]
[Controls/param]
type = MultiAppSamplerControl
multi_app = sub
param_names = 'Reporters/const/real_vector_values[0,1,2,3,4]'
[]
[Transfers/data]
type = SamplerReporterTransfer
from_multi_app = sub
from_reporter = 'const/num_vec'
stochastic_reporter = storage
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = none
[]
[stats]
type = StatisticsReporter
reporters = storage/data:const:num_vec
compute = 'mean stddev'
ci_method = 'bca'
ci_levels = '0.025 0.05 0.1 0.16 0.5 0.84 0.9 0.95 0.975'
ci_replicates = 10000
ci_seed = 1945
execute_on = FINAL
[]
[]
[Outputs]
execute_on = FINAL
[out]
type = JSON
[]
[]
(modules/stochastic_tools/test/tests/surrogates/multioutput_gp/mogp_lmc.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 15.0
standard_deviation = 2.0
[]
[bc_dist]
type = Normal
mean = 1000.0
standard_deviation = 100.0
[]
[]
[Samplers]
[train]
type = LatinHypercube
num_rows = 10
distributions = 'k_dist bc_dist'
execute_on = PRE_MULTIAPP_SETUP
seed = 100
[]
[test]
type = LatinHypercube
num_rows = 5
distributions = 'k_dist bc_dist'
seed = 101
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
mode = batch-reset
sampler = train
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = train
param_names = 'Materials/conductivity/prop_values BCs/right/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = train
stochastic_reporter = results
from_reporter = 'T_vec/T'
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[eval_test]
type = EvaluateSurrogate
model = mogp
response_type = vector_real
parallel_type = ROOT
execute_on = timestep_end
sampler = test
evaluate_std = true
[]
[]
[Trainers]
[mogp_trainer]
type = GaussianProcessTrainer
execute_on = timestep_end
covariance_function = 'lmc'
standardize_params = 'true'
standardize_data = 'true'
sampler = train
response_type = vector_real
response = results/data:T_vec:T
[]
[]
[Covariance]
[covar]
type = SquaredExponentialCovariance
signal_variance = 2.76658083
noise_variance = 0.0
length_factor = '3.67866381 2.63421705'
[]
[lmc]
type = LMC
covariance_functions = covar
num_outputs = 2
num_latent_funcs = 1
[]
[]
[Surrogates]
[mogp]
type = GaussianProcessSurrogate
trainer = mogp_trainer
[]
[]
[VectorPostprocessors]
[train_params]
type = SamplerData
sampler = train
execute_on = final
[]
[test_params]
type = SamplerData
sampler = test
execute_on = final
[]
[hyperparams]
type = GaussianProcessData
gp_name = mogp
execute_on = final
[]
[]
[Outputs]
[out]
type = JSON
execute_on = final
vectorpostprocessors_as_reporters = true
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/examples/surrogates/nearest_point_normal.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[q_dist]
type = Normal
mean = 10000
standard_deviation = 500
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[Tinf_dist]
type = Normal
mean = 300
standard_deviation = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 100000
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = initial
[]
[]
[Reporters]
# Sampling surrogate
[samp]
type = EvaluateSurrogate
model = 'nearest_point_avg nearest_point_max'
sampler = sample
parallel_type = ROOT
[]
# Computing statistics
[stats]
type = StatisticsReporter
reporters = 'samp/nearest_point_avg samp/nearest_point_max'
compute = 'mean stddev'
[]
[]
[Surrogates]
[nearest_point_avg]
type = NearestPointSurrogate
filename = 'nearest_point_training_out_nearest_point_avg.rd'
[]
[nearest_point_max]
type = NearestPointSurrogate
filename = 'nearest_point_training_out_nearest_point_max.rd'
[]
[]
[Outputs]
csv = true
[]
(modules/stochastic_tools/test/tests/samplers/mcmc/main_base.i)
[StochasticTools]
[]
[Distributions]
[left]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[right]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[]
[Likelihood]
[gaussian]
type = Gaussian
noise = 'noise_specified/noise_specified'
file_name = 'exp_0_05.csv'
log_likelihood = true
[]
[]
[Samplers]
[sample]
type = PMCMCBase
prior_distributions = 'left right'
num_parallel_proposals = 2
initial_values = '0.1 0.1'
file_name = 'confg.csv'
execute_on = PRE_MULTIAPP_SETUP
seed = 2547
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'left_bc right_bc mesh1'
[]
[]
[Reporters]
[constant]
type = StochasticReporter
[]
[noise_specified]
type = ConstantReporter
real_names = 'noise_specified'
real_values = '0.05'
[]
[mcmc_reporter]
type = PMCMCDecision
output_value = constant/reporter_transfer:average:value
sampler = sample
likelihoods = 'gaussian'
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
file_base = 'mcmc_base'
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/test/tests/samplers/mcmc/main_ss.i)
[StochasticTools]
[]
[Distributions]
[left]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[right]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[]
[Likelihood]
[gaussian]
type = Gaussian
noise = 'noise_specified/noise_specified'
file_name = 'exp_0_05.csv'
log_likelihood = true
[]
[]
[Samplers]
[sample]
type = AffineInvariantStretchSampler
prior_distributions = 'left right'
num_parallel_proposals = 5
file_name = 'confg.csv'
execute_on = PRE_MULTIAPP_SETUP
seed = 2547
initial_values = '0.1 0.1'
previous_state = 'mcmc_reporter/inputs'
previous_state_var = 'mcmc_reporter/variance'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'left_bc right_bc mesh1'
[]
[]
[Reporters]
[constant]
type = StochasticReporter
[]
[noise_specified]
type = ConstantReporter
real_names = 'noise_specified'
real_values = '0.05'
[]
[mcmc_reporter]
type = AffineInvariantStretchDecision
output_value = constant/reporter_transfer:average:value
sampler = sample
likelihoods = 'gaussian'
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
file_base = 'ss_5prop'
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/test/tests/likelihoods/gaussian_derived/main.i)
[StochasticTools]
[]
[Distributions]
[mu1]
type = Normal
mean = 0.0
standard_deviation = 0.5
[]
[]
[Samplers]
[sample]
type = MonteCarlo
distributions = 'mu1 mu1'
num_rows = 3
seed = 2547
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
# to_control = 'stochastic'
[]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Reporters]
[constant]
type = StochasticReporter
[]
[noise_specified]
type = ConstantReporter
real_names = 'noise_specified'
real_values = '0.2'
[]
[likelihoodtest]
type = TestLikelihood
likelihoods = 'gaussian'
model_pred = constant/reporter_transfer:average:value
sampler = sample
[]
[]
[Likelihood]
[gaussian]
type = Gaussian
noise = 'noise_specified/noise_specified'
file_name = 'exp1.csv'
log_likelihood=true
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
file_base ='loglikelihood_scalar'
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/test/tests/surrogates/cross_validation/poly_reg_vec.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[]
[Samplers]
[sample]
type = LatinHypercube
num_rows = 10
distributions = 'k_dist L_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[GlobalParams]
sampler = sample
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub_vector.i
mode = batch-reset
execute_on = initial
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
param_names = 'Materials/conductivity/prop_values L'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
stochastic_reporter = results
from_reporter = 'T_vec/T T_vec/x'
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[cv_scores]
type = CrossValidationScores
models = pr_surrogate
execute_on = FINAL
[]
[]
[Trainers]
[pr_trainer]
type = PolynomialRegressionTrainer
regression_type = "ols"
sampler = sample
response = results/data:T_vec:T
response_type = vector_real
execute_on = timestep_end
max_degree = 1
cv_type = "k_fold"
cv_splits = 2
cv_n_trials = 3
cv_surrogate = pr_surrogate
cv_seed = 1
[]
[]
[Surrogates]
[pr_surrogate]
type = PolynomialRegressionSurrogate
trainer = pr_trainer
[]
[]
[Outputs]
[out]
type = JSON
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2dnorm_quad_moment.i)
[StochasticTools]
[]
[Distributions]
[D_dist]
type = Normal
mean = 5
standard_deviation = 0.5
[]
[S_dist]
type = Normal
mean = 8
standard_deviation = 0.7
[]
[]
[Samplers]
[quadrature]
type = Quadrature
distributions = 'D_dist S_dist'
execute_on = INITIAL
order = 5
[]
[]
[MultiApps]
[quad_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = quadrature
mode = batch-restore
[]
[]
[Transfers]
[quad]
type = SamplerParameterTransfer
to_multi_app = quad_sub
sampler = quadrature
parameters = 'Materials/diffusivity/prop_values Materials/xs/prop_values'
[]
[data]
type = SamplerReporterTransfer
from_multi_app = quad_sub
sampler = quadrature
stochastic_reporter = storage
from_reporter = avg/value
[]
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = none
[]
[pc_moments]
type = PolynomialChaosReporter
pc_name = poly_chaos
statistics = 'mean stddev skewness kurtosis'
execute_on = final
[]
[]
[Surrogates]
[poly_chaos]
type = PolynomialChaos
trainer = poly_chaos
[]
[]
[Trainers]
[poly_chaos]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 5
distributions = 'D_dist S_dist'
sampler = quadrature
response = storage/data:avg:value
[]
[]
[Outputs]
[out]
type = JSON
execute_on = FINAL
[]
[]
(modules/stochastic_tools/examples/workshop/step03.i)
[StochasticTools]
[]
[Distributions]
[D]
type = Uniform
lower_bound = 0.5
upper_bound = 2.5
[]
[q]
type = Normal
mean = 100
standard_deviation = 25
[]
[T_0]
type = Normal
mean = 300
standard_deviation = 45
[]
[q_0]
type = Weibull
location = -110
scale = 20
shape = 1
[]
[]
[Samplers]
[hypercube]
type = LatinHypercube
num_rows = 5000
distributions = 'D q T_0 q_0'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = hypercube
input_files = 'diffusion.i'
cli_args = 'Outputs/console=false'
mode = batch-restore
[]
[]
[Transfers]
[parameters]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = hypercube
parameters = 'Materials/constant/prop_values
Kernels/source/value
BCs/left/value
BCs/right/value'
[]
[results]
type = SamplerReporterTransfer
from_multi_app = runner
sampler = hypercube
stochastic_reporter = sampling_matrix
from_reporter = 'T_avg/value q_left/value'
[]
[]
[Reporters]
[sampling_matrix]
type = StochasticMatrix
sampler = hypercube
sampler_column_names = 'D q T_0 q_0'
parallel_type = ROOT
[]
[stats]
type = StatisticsReporter
reporters = 'sampling_matrix/results:T_avg:value sampling_matrix/results:q_left:value'
compute = 'mean stddev'
ci_method = 'percentile'
ci_levels = '0.05 0.95'
[]
[]
[Outputs]
json = true
[]
(modules/stochastic_tools/test/tests/surrogates/multioutput_gp/mogp_lmc_load.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 15.0
standard_deviation = 2.0
[]
[bc_dist]
type = Normal
mean = 1000.0
standard_deviation = 100.0
[]
[]
[Samplers]
[test]
type = LatinHypercube
num_rows = 5
distributions = 'k_dist bc_dist'
seed = 101
[]
[]
[Reporters]
[eval_test]
type = EvaluateSurrogate
model = mogp
response_type = vector_real
parallel_type = ROOT
execute_on = timestep_end
sampler = test
evaluate_std = true
[]
[]
[Surrogates]
[mogp]
type = GaussianProcessSurrogate
filename = "mogp_lmc_tuned_surr_mogp_trainer.rd"
[]
[]
[VectorPostprocessors]
[test_params]
type = SamplerData
sampler = test
execute_on = 'final'
[]
[hyperparams]
type = GaussianProcessData
gp_name = mogp
execute_on = final
[]
[]
[Outputs]
[out]
type = JSON
execute_on = final
vectorpostprocessors_as_reporters = true
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/test/tests/samplers/mcmc/main_des.i)
[StochasticTools]
[]
[Distributions]
[left]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[right]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[]
[Likelihood]
[gaussian]
type = Gaussian
noise = 'noise_specified/noise_specified'
file_name = 'exp_0_05.csv'
log_likelihood = true
[]
[]
[Samplers]
[sample]
type = AffineInvariantDES
prior_distributions = 'left right'
num_parallel_proposals = 5
file_name = 'confg.csv'
execute_on = PRE_MULTIAPP_SETUP
seed = 2547
initial_values = '0.1 0.1'
previous_state = 'mcmc_reporter/inputs'
previous_state_var = 'mcmc_reporter/variance'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'left_bc right_bc mesh1'
[]
[]
[Reporters]
[constant]
type = StochasticReporter
[]
[noise_specified]
type = ConstantReporter
real_names = 'noise_specified'
real_values = '0.05'
[]
[mcmc_reporter]
type = AffineInvariantDifferentialDecision
output_value = constant/reporter_transfer:average:value
sampler = sample
likelihoods = 'gaussian'
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
file_base = 'des_5prop'
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/examples/parameter_study/nonlin_diff_react/nonlin_diff_react_parent_normal.i)
[StochasticTools]
[]
[Distributions]
[mu1]
type = Normal
mean = 0.3
standard_deviation = 0.045
[]
[mu2]
type = Normal
mean = 9
standard_deviation = 1.35
[]
[]
[Samplers]
[hypercube]
type = LatinHypercube
num_rows = 5000
distributions = 'mu1 mu2'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = hypercube
input_files = 'nonlin_diff_react_sub.i'
mode = batch-restore
[]
[]
[Transfers]
[parameters]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = hypercube
parameters = 'Kernels/nonlin_function/mu1 Kernels/nonlin_function/mu2'
[]
[results]
type = SamplerPostprocessorTransfer
from_multi_app = runner
sampler = hypercube
to_vector_postprocessor = results
from_postprocessor = 'max min average'
[]
[]
[VectorPostprocessors]
[results]
type = StochasticResults
[]
[]
[Reporters]
[stats]
type = StatisticsReporter
vectorpostprocessors = results
compute = 'mean'
ci_method = 'percentile'
ci_levels = '0.05'
[]
[]
[Outputs]
csv = true
execute_on = 'FINAL'
[]
(modules/stochastic_tools/test/tests/surrogates/polynomial_regression/poly_reg_vec.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[]
[Samplers]
[sample]
type = LatinHypercube
num_rows = 10
distributions = 'k_dist L_dist'
execute_on = PRE_MULTIAPP_SETUP
min_procs_per_row = 2
[]
[]
[GlobalParams]
sampler = sample
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub_vector.i
mode = batch-reset
execute_on = initial
min_procs_per_app = 2
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
param_names = 'Materials/conductivity/prop_values L'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
stochastic_reporter = results
from_reporter = 'T_vec/T T_vec/x'
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[eval]
type = EvaluateSurrogate
model = pr_surrogate
response_type = vector_real
parallel_type = ROOT
execute_on = timestep_end
[]
[]
[Trainers]
[pr]
type = PolynomialRegressionTrainer
regression_type = ols
max_degree = 2
response = results/data:T_vec:T
response_type = vector_real
execute_on = initial
[]
[]
[Surrogates]
[pr_surrogate]
type = PolynomialRegressionSurrogate
trainer = pr
[]
[]
[Outputs]
[out]
type = JSON
execute_on = timestep_end
[]
[]
(modules/stochastic_tools/examples/surrogates/polynomial_regression/normal_surr.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[q_dist]
type = Normal
mean = 10000
standard_deviation = 500
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[Tinf_dist]
type = Normal
mean = 300
standard_deviation = 10
[]
[]
[Samplers]
[sample]
type = LatinHypercube
num_rows = 100000
distributions = 'k_dist q_dist L_dist Tinf_dist'
[]
[]
[Surrogates]
[pc_max]
type = PolynomialChaos
filename = 'normal_train_pc_out_pc_max.rd'
[]
[pr_max]
type = PolynomialRegressionSurrogate
filename = 'normal_train_pr_out_pr_max.rd'
[]
[]
[Reporters]
[pc_max_res]
type = EvaluateSurrogate
model = pc_max
sampler = sample
parallel_type = ROOT
[]
[pr_max_res]
type = EvaluateSurrogate
model = pr_max
sampler = sample
parallel_type = ROOT
[]
[pr_max_stats]
type = StatisticsReporter
reporters = 'pr_max_res/pr_max'
compute = 'mean stddev'
[]
[pc_max_stats]
type = PolynomialChaosReporter
pc_name = 'pc_max'
statistics = 'mean stddev'
[]
[]
[Outputs]
[out]
type = JSON
execute_on = timestep_end
[]
[]
(modules/stochastic_tools/examples/surrogates/poly_chaos_normal_quad.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[q_dist]
type = Normal
mean = 10000
standard_deviation = 500
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[Tinf_dist]
type = Normal
mean = 300
standard_deviation = 10
[]
[]
[Samplers]
[sample]
type = Quadrature
order = 10
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = sample
stochastic_reporter = results
from_reporter = 'avg/value max/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[]
[Trainers]
[poly_chaos_avg]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 10
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = sample
response = results/data:avg:value
[]
[poly_chaos_max]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 10
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = sample
response = results/data:max:value
[]
[]
[Outputs]
file_base = poly_chaos_training
[out]
type = SurrogateTrainerOutput
trainers = 'poly_chaos_avg poly_chaos_max'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/surrogates/multioutput_gp/mogp_lmc_tuned.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 15.0
standard_deviation = 2.0
[]
[bc_dist]
type = Normal
mean = 1000.0
standard_deviation = 100.0
[]
[]
[Samplers]
[train]
type = LatinHypercube
num_rows = 10
distributions = 'k_dist bc_dist'
execute_on = PRE_MULTIAPP_SETUP
seed = 100
[]
[test]
type = LatinHypercube
num_rows = 5
distributions = 'k_dist bc_dist'
seed = 101
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
mode = batch-reset
sampler = train
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = train
param_names = 'Materials/conductivity/prop_values BCs/right/value'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
sampler = train
stochastic_reporter = results
from_reporter = 'T_vec/T'
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[eval_test]
type = EvaluateSurrogate
model = mogp
response_type = vector_real
parallel_type = ROOT
execute_on = timestep_end
sampler = test
evaluate_std = true
[]
[]
[Trainers]
[mogp_trainer]
type = GaussianProcessTrainer
execute_on = timestep_end
covariance_function = 'lmc'
standardize_params = 'true'
standardize_data = 'true'
sampler = train
response_type = vector_real
response = results/data:T_vec:T
tune_parameters = 'lmc:acoeff_0 lmc:lambda_0 covar:signal_variance covar:length_factor'
tuning_min = '1e-9 1e-9 1e-9 1e-9'
tuning_max = '1e16 1e16 1e16 1e16'
num_iters = 1000
batch_size = 10
learning_rate = 0.0005
show_every_nth_iteration = 1
[]
[]
[Covariance]
[covar]
type = SquaredExponentialCovariance
signal_variance = 2.76658083
noise_variance = 0.0
length_factor = '3.67866381 2.63421705'
[]
[lmc]
type = LMC
covariance_functions = covar
num_outputs = 2
num_latent_funcs = 1
[]
[]
[Surrogates]
[mogp]
type = GaussianProcessSurrogate
trainer = mogp_trainer
[]
[]
[VectorPostprocessors]
[train_params]
type = SamplerData
sampler = train
execute_on = final
[]
[test_params]
type = SamplerData
sampler = test
execute_on = final
[]
[hyperparams]
type = GaussianProcessData
gp_name = mogp
execute_on = final
[]
[]
[Outputs]
[out]
type = JSON
execute_on = final
vectorpostprocessors_as_reporters = true
execute_system_information_on = NONE
[]
[surr]
type = SurrogateTrainerOutput
execute_on = FINAL
trainers = "mogp_trainer"
[]
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2dnorm_quad.i)
[StochasticTools]
[]
[Distributions]
[D_dist]
type = Normal
mean = 5
standard_deviation = 0.5
[]
[S_dist]
type = Normal
mean = 8
standard_deviation = 0.7
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 100
distributions = 'D_dist S_dist'
execute_on = timestep_end
[]
[quadrature]
type = Quadrature
distributions = 'D_dist S_dist'
execute_on = INITIAL
order = 5
[]
[]
[MultiApps]
[quad_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = quadrature
mode = batch-restore
[]
[]
[Transfers]
[quad]
type = SamplerParameterTransfer
to_multi_app = quad_sub
sampler = quadrature
parameters = 'Materials/diffusivity/prop_values Materials/xs/prop_values'
[]
[data]
type = SamplerReporterTransfer
from_multi_app = quad_sub
sampler = quadrature
stochastic_reporter = storage
from_reporter = avg/value
[]
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = none
[]
[pc_samp]
type = EvaluateSurrogate
model = poly_chaos
sampler = sample
parallel_type = ROOT
execute_on = final
[]
[]
[Surrogates]
[poly_chaos]
type = PolynomialChaos
trainer = poly_chaos
[]
[]
[Trainers]
[poly_chaos]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 5
distributions = 'D_dist S_dist'
sampler = quadrature
response = storage/data:avg:value
[]
[]
[Outputs]
[out]
type = CSV
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/samplers/AdaptiveImportanceSampler/ais.i)
[StochasticTools]
[]
[Distributions]
[mu1]
type = Normal
mean = 0.0
standard_deviation = 0.5
[]
[mu2]
type = Normal
mean = 1
standard_deviation = 0.5
[]
[]
[Samplers]
[sample]
type = AdaptiveImportance
distributions = 'mu1 mu2'
proposal_std = '1.0 1.0'
output_limit = 0.65
num_samples_train = 30
num_importance_sampling_steps = 30
std_factor = 0.9
initial_values = '-0.103 1.239'
inputs_reporter = 'adaptive_MC/inputs'
use_absolute_value = true
seed = 1012
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
[]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Reporters]
[constant]
type = StochasticReporter
[]
[adaptive_MC]
type = AdaptiveMonteCarloDecision
output_value = constant/reporter_transfer:average:value
inputs = 'inputs'
sampler = sample
[]
[ais_stats]
type = AdaptiveImportanceStats
output_value = constant/reporter_transfer:average:value
sampler = sample
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
[out]
type = JSON
[]
[]
(modules/stochastic_tools/test/tests/samplers/mcmc/main_imh.i)
[StochasticTools]
[]
[Distributions]
[left]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[right]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[]
[Likelihood]
[gaussian]
type = Gaussian
noise = 'noise_specified/noise_specified'
file_name = 'exp_0_05.csv'
log_likelihood = true
[]
[]
[Samplers]
[sample]
type = IndependentGaussianMH
prior_distributions = 'left right'
# previous_state = 'mcmc_reporter/inputs'
num_parallel_proposals = 5
file_name = 'confg.csv'
execute_on = PRE_MULTIAPP_SETUP
seed = 2547
std_prop = '0.05 0.05'
initial_values = '0.1 0.1'
seed_inputs = 'mcmc_reporter/seed_input'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'left_bc right_bc mesh1'
[]
[]
[Reporters]
[constant]
type = StochasticReporter
[]
[noise_specified]
type = ConstantReporter
real_names = 'noise_specified'
real_values = '0.05'
[]
[mcmc_reporter]
type = IndependentMHDecision
output_value = constant/reporter_transfer:average:value
sampler = sample
likelihoods = 'gaussian'
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
file_base = 'imh_5prop'
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/examples/parameter_study/main.i)
[StochasticTools]
[]
[Distributions]
[gamma]
type = Uniform
lower_bound = 0.5
upper_bound = 2.5
[]
[q_0]
type = Weibull
location = -110
scale = 20
shape = 1
[]
[T_0]
type = Normal
mean = 300
standard_deviation = 45
[]
[s]
type = Normal
mean = 100
standard_deviation = 25
[]
[]
[Samplers]
[hypercube]
type = LatinHypercube
num_rows = 5000
distributions = 'gamma q_0 T_0 s'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = hypercube
input_files = 'diffusion.i'
mode = batch-restore
[]
[]
[Transfers]
[parameters]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = hypercube
parameters = 'Materials/constant/prop_values Kernels/source/value BCs/right/value BCs/left/value'
[]
[results]
type = SamplerReporterTransfer
from_multi_app = runner
sampler = hypercube
stochastic_reporter = results
from_reporter = 'T_avg/value q_left/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[stats]
type = StatisticsReporter
reporters = 'results/results:T_avg:value results/results:q_left:value'
compute = 'mean stddev'
ci_method = 'percentile'
ci_levels = '0.05 0.95'
[]
[]
[Outputs]
execute_on = 'FINAL'
[out]
type = JSON
[]
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/main_2dnorm_quad_locs.i)
[StochasticTools]
[]
[Distributions]
[D_dist]
type = Normal
mean = 5
standard_deviation = 0.5
[]
[S_dist]
type = Normal
mean = 8
standard_deviation = 0.7
[]
[]
[Samplers]
[grid]
type = CartesianProduct
linear_space_items = '2.5 0.5 10 3 1 10'
[]
[quadrature]
type = Quadrature
distributions = 'D_dist S_dist'
execute_on = INITIAL
order = 5
[]
[]
[MultiApps]
[quad_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = quadrature
mode = batch-restore
[]
[]
[Transfers]
[quad]
type = SamplerParameterTransfer
to_multi_app = quad_sub
sampler = quadrature
parameters = 'Materials/diffusivity/prop_values Materials/xs/prop_values'
[]
[data]
type = SamplerReporterTransfer
from_multi_app = quad_sub
sampler = quadrature
stochastic_reporter = storage
from_reporter = avg/value
[]
[]
[Reporters]
[storage]
type = StochasticReporter
outputs = none
[]
[local_sense]
type = PolynomialChaosReporter
pc_name = poly_chaos
local_sensitivity_sampler = grid
local_sensitivity_points = '3.14159 3.14159 2.7182 3.14159 3.14159 2.7182 2.7182 2.7182'
execute_on = final
[]
[]
[Surrogates]
[poly_chaos]
type = PolynomialChaos
trainer = poly_chaos
[]
[]
[Trainers]
[poly_chaos]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 5
distributions = 'D_dist S_dist'
sampler = quadrature
response = storage/data:avg:value
[]
[]
[Outputs]
[out]
type = JSON
execute_on = FINAL
[]
[]
(modules/stochastic_tools/test/tests/surrogates/nearest_point/np_vec.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[]
[Samplers]
[sample]
type = LatinHypercube
num_rows = 10
distributions = 'k_dist L_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[GlobalParams]
sampler = sample
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub_vector.i
mode = batch-reset
execute_on = initial
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
param_names = 'Materials/conductivity/prop_values L'
[]
[]
[Transfers]
[data]
type = SamplerReporterTransfer
from_multi_app = sub
stochastic_reporter = results
from_reporter = 'T_vec/T T_vec/x'
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[eval]
type = EvaluateSurrogate
model = np_surrogate
response_type = vector_real
parallel_type = ROOT
execute_on = timestep_end
[]
[]
[Trainers]
[np]
type = NearestPointTrainer
response = results/data:T_vec:T
response_type = vector_real
execute_on = initial
[]
[]
[Surrogates]
[np_surrogate]
type = NearestPointSurrogate
trainer = np
[]
[]
[Outputs]
[out]
type = JSON
execute_on = timestep_end
[]
[]
(modules/stochastic_tools/test/tests/reporters/AISActiveLearning/ais_al.i)
[StochasticTools]
[]
[Distributions]
[mu1]
type = Normal
mean = 0.0
standard_deviation = 0.5
[]
[mu2]
type = Normal
mean = 1
standard_deviation = 0.5
[]
[]
[Samplers]
[sample]
type = AISActiveLearning
distributions = 'mu1 mu2'
proposal_std = '1.0 1.0'
output_limit = 0.65
num_samples_train = 15
num_importance_sampling_steps = 5
std_factor = 0.9
initial_values = '-0.103 1.239'
inputs_reporter = 'adaptive_MC/inputs'
use_absolute_value = true
flag_sample = 'conditional/flag_sample'
seed = 9874
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
mode = batch-reset
should_run_reporter = conditional/need_sample
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[param]
type = SamplerParameterTransfer
to_multi_app = sub
sampler = sample
parameters = 'BCs/left/value BCs/right/value'
to_control = 'stochastic'
[]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'conditional'
from_multi_app = sub
sampler = sample
[]
[]
[Reporters]
[conditional]
type = ActiveLearningGPDecision
sampler = sample
parallel_type = ROOT
execute_on = 'initial timestep_begin'
flag_sample = 'flag_sample'
inputs = 'inputs'
gp_mean = 'gp_mean'
gp_std = 'gp_std'
n_train = 5
al_gp = GP_al_trainer
gp_evaluator = GP_eval
learning_function = 'Ufunction'
learning_function_parameter = 0.65
learning_function_threshold = 2.0
[]
[adaptive_MC]
type = AdaptiveMonteCarloDecision
output_value = conditional/gp_mean
inputs = 'inputs'
sampler = sample
gp_decision = conditional
[]
[ais_stats]
type = AdaptiveImportanceStats
output_value = conditional/gp_mean
sampler = sample
flag_sample = 'conditional/flag_sample'
[]
[]
[Trainers]
[GP_al_trainer]
type = ActiveLearningGaussianProcess
covariance_function = 'covar'
standardize_params = 'true'
standardize_data = 'true'
tune_parameters = 'covar:signal_variance covar:length_factor'
num_iters = 2000
learning_rate = 0.005
[]
[]
[Surrogates]
[GP_eval]
type = GaussianProcessSurrogate
trainer = GP_al_trainer
[]
[]
[Covariance]
[covar]
type = SquaredExponentialCovariance
signal_variance = 1.0
noise_variance = 1e-8
length_factor = '1.0 1.0'
[]
[]
[Executioner]
type = Transient
[]
[Outputs]
file_base = 'ais_al'
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/examples/workshop/step01.i)
[StochasticTools]
[]
[Distributions]
[D]
type = Uniform
lower_bound = 0.5
upper_bound = 2.5
[]
[q]
type = Normal
mean = 100
standard_deviation = 25
[]
[T_0]
type = Normal
mean = 300
standard_deviation = 45
[]
[q_0]
type = Weibull
location = -110
scale = 20
shape = 1
[]
[]
[Samplers]
[hypercube]
type = LatinHypercube
num_rows = 5000
distributions = 'D q T_0 q_0'
[]
[]
[Reporters]
[sampling_matrix]
type = StochasticMatrix
sampler = hypercube
sampler_column_names = 'D q T_0 q_0'
parallel_type = ROOT
[]
[]
[Outputs]
csv = true
[]
(modules/stochastic_tools/test/tests/distributions/normal_direct.i)
[StochasticTools]
[]
[Distributions]
[normal_test]
type = Normal
mean = 0
standard_deviation = 1
[]
[]
[Postprocessors]
[cdf]
type = TestDistributionDirectPostprocessor
distribution = normal_test
value = 0
method = cdf
execute_on = initial
[]
[pdf]
type = TestDistributionDirectPostprocessor
distribution = normal_test
value = 0
method = pdf
execute_on = initial
[]
[quantile]
type = TestDistributionDirectPostprocessor
distribution = normal_test
value = 0.5
method = quantile
execute_on = initial
[]
[]
[Outputs]
execute_on = 'INITIAL'
csv = true
[]
(modules/stochastic_tools/test/tests/samplers/mcmc/main_des_var.i)
[StochasticTools]
[]
[Distributions]
[left]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[right]
type = Normal
mean = 0.0
standard_deviation = 1.0
[]
[variance]
type = Uniform
lower_bound = 0.0
upper_bound = 0.5
[]
[]
[Likelihood]
[gaussian]
type = Gaussian
noise = 'mcmc_reporter/noise'
file_name = 'exp_0_05.csv'
log_likelihood = true
[]
[]
[Samplers]
[sample]
type = AffineInvariantDES
prior_distributions = 'left right'
num_parallel_proposals = 5
file_name = 'confg.csv'
execute_on = PRE_MULTIAPP_SETUP
seed = 2547
initial_values = '0.1 0.1'
previous_state = 'mcmc_reporter/inputs'
previous_state_var = 'mcmc_reporter/variance'
prior_variance = 'variance'
[]
[]
[MultiApps]
[sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = sample
[]
[]
[Transfers]
[reporter_transfer]
type = SamplerReporterTransfer
from_reporter = 'average/value'
stochastic_reporter = 'constant'
from_multi_app = sub
sampler = sample
[]
[]
[Controls]
[cmdline]
type = MultiAppSamplerControl
multi_app = sub
sampler = sample
param_names = 'left_bc right_bc mesh1'
[]
[]
[Reporters]
[constant]
type = StochasticReporter
[]
[mcmc_reporter]
type = AffineInvariantDifferentialDecision
output_value = constant/reporter_transfer:average:value
sampler = sample
likelihoods = 'gaussian'
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
file_base = 'des_5prop_var'
[out]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/stochastic_tools/examples/sobol/main.i)
[StochasticTools]
[]
[Distributions]
[gamma]
type = Uniform
lower_bound = 0.5
upper_bound = 2.5
[]
[q_0]
type = Weibull
location = -110
scale = 20
shape = 1
[]
[T_0]
type = Normal
mean = 300
standard_deviation = 45
[]
[s]
type = Normal
mean = 100
standard_deviation = 25
[]
[]
[Samplers]
[hypercube_a]
type = LatinHypercube
num_rows = 10000
distributions = 'gamma q_0 T_0 s'
seed = 2011
[]
[hypercube_b]
type = LatinHypercube
num_rows = 10000
distributions = 'gamma q_0 T_0 s'
seed = 2013
[]
[sobol]
type = Sobol
sampler_a = hypercube_a
sampler_b = hypercube_b
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = sobol
input_files = 'diffusion.i'
mode = batch-restore
[]
[]
[Transfers]
[parameters]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = sobol
parameters = 'Materials/constant/prop_values Kernels/source/value BCs/right/value BCs/left/value'
[]
[results]
type = SamplerReporterTransfer
from_multi_app = runner
sampler = sobol
stochastic_reporter = results
from_reporter = 'T_avg/value q_left/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[stats]
type = StatisticsReporter
reporters = 'results/results:T_avg:value results/results:q_left:value'
compute = 'mean'
ci_method = 'percentile'
ci_levels = '0.05 0.95'
[]
[sobol]
type = SobolReporter
sampler = sobol
reporters = 'results/results:T_avg:value results/results:q_left:value'
ci_levels = '0.05 0.95'
[]
[]
[Outputs]
execute_on = 'FINAL'
[out]
type = JSON
[]
[]
(modules/stochastic_tools/examples/surrogates/polynomial_regression/normal_train.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[q_dist]
type = Normal
mean = 10000
standard_deviation = 500
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[Tinf_dist]
type = Normal
mean = 300
standard_deviation = 10
[]
[]
[Samplers]
[pc_sampler]
type = Quadrature
order = 8
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = PRE_MULTIAPP_SETUP
[]
[pr_sampler]
type = LatinHypercube
distributions = 'k_dist q_dist L_dist Tinf_dist'
num_rows = 6560
execute_on = PRE_MULTIAPP_SETUP
[]
[]
[MultiApps]
[pc_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = pc_sampler
[]
[pr_sub]
type = SamplerFullSolveMultiApp
input_files = sub.i
sampler = pr_sampler
[]
[]
[Controls]
[pc_cmdline]
type = MultiAppSamplerControl
multi_app = pc_sub
sampler = pc_sampler
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[pr_cmdline]
type = MultiAppSamplerControl
multi_app = pr_sub
sampler = pr_sampler
param_names = 'Materials/conductivity/prop_values Kernels/source/value Mesh/xmax BCs/right/value'
[]
[]
[Transfers]
[pc_data]
type = SamplerReporterTransfer
from_multi_app = pc_sub
sampler = pc_sampler
stochastic_reporter = results
from_reporter = 'max/value'
[]
[pr_data]
type = SamplerReporterTransfer
from_multi_app = pr_sub
sampler = pr_sampler
stochastic_reporter = results
from_reporter = 'max/value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
[]
[]
[Trainers]
[pc_max]
type = PolynomialChaosTrainer
execute_on = timestep_end
order = 8
distributions = 'k_dist q_dist L_dist Tinf_dist'
sampler = pc_sampler
response = results/pc_data:max:value
[]
[pr_max]
type = PolynomialRegressionTrainer
execute_on = timestep_end
regression_type = "ols"
max_degree = 4
sampler = pr_sampler
response = results/pr_data:max:value
[]
[]
[Outputs]
[pc_out]
type = SurrogateTrainerOutput
trainers = 'pc_max'
execute_on = FINAL
[]
[pr_out]
type = SurrogateTrainerOutput
trainers = 'pr_max'
execute_on = FINAL
[]
[]
(modules/stochastic_tools/examples/workshop/step04.i)
[StochasticTools]
[]
[Distributions]
[D]
type = Uniform
lower_bound = 0.5
upper_bound = 2.5
[]
[q]
type = Normal
mean = 100
standard_deviation = 25
[]
[T_0]
type = Normal
mean = 300
standard_deviation = 45
[]
[q_0]
type = Weibull
location = -110
scale = 20
shape = 1
[]
[]
[Samplers]
[hypercube]
type = LatinHypercube
num_rows = 1000
distributions = 'D q T_0 q_0'
[]
[resample]
type = LatinHypercube
num_rows = 1000
seed = 2025
distributions = 'D q T_0 q_0'
[]
[sobol]
type = Sobol
sampler_a = hypercube
sampler_b = resample
resample = false
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = sobol
input_files = 'diffusion.i'
cli_args = 'Outputs/console=false'
mode = batch-restore
[]
[]
[Transfers]
[parameters]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = sobol
parameters = 'Materials/constant/prop_values
Kernels/source/value
BCs/left/value
BCs/right/value'
[]
[results]
type = SamplerReporterTransfer
from_multi_app = runner
sampler = sobol
stochastic_reporter = sampling_matrix
from_reporter = 'T_avg/value q_left/value'
[]
[]
[Reporters]
[sampling_matrix]
type = StochasticMatrix
sampler = sobol
sampler_column_names = 'D q T_0 q_0'
parallel_type = ROOT
[]
[sobol]
type = SobolReporter
sampler = sobol
reporters = 'sampling_matrix/results:T_avg:value sampling_matrix/results:q_left:value'
ci_levels = '0.05 0.95'
[]
[]
[Outputs]
json = true
[]
(modules/stochastic_tools/examples/parameter_study/main_time.i)
[StochasticTools]
[]
[Distributions]
[gamma]
type = Uniform
lower_bound = 0.5
upper_bound = 2.5
[]
[q_0]
type = Weibull
location = -110
scale = 20
shape = 1
[]
[T_0]
type = Normal
mean = 300
standard_deviation = 45
[]
[s]
type = Normal
mean = 100
standard_deviation = 25
[]
[]
[Samplers]
[hypercube]
type = LatinHypercube
num_rows = 5000
distributions = 'gamma q_0 T_0 s'
[]
[]
[MultiApps]
[runner]
type = SamplerTransientMultiApp
sampler = hypercube
input_files = 'diffusion_time.i'
mode = batch-restore
[]
[]
[Transfers]
[parameters]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = hypercube
parameters = 'Materials/constant/prop_values Kernels/source/value BCs/right/value BCs/left/value'
[]
[results]
type = SamplerReporterTransfer
from_multi_app = runner
sampler = hypercube
stochastic_reporter = results
from_reporter = 'T_avg/value q_left/value T_vec/T'
[]
[x_transfer]
type = MultiAppReporterTransfer
from_multi_app = runner
subapp_index = 0
from_reporters = T_vec/x
to_reporters = const/x
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[stats]
type = StatisticsReporter
reporters = 'results/results:T_avg:value results/results:q_left:value results/results:T_vec:T'
compute = 'mean stddev'
ci_method = 'percentile'
ci_levels = '0.05 0.95'
[]
[const]
type = ConstantReporter
real_vector_names = 'x'
real_vector_values = '0'
[]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.25
[]
[Outputs]
execute_on = timestep_end
[out]
type = JSON
[]
[]
(modules/stochastic_tools/examples/workshop/step02.i)
[StochasticTools]
[]
[Distributions]
[D]
type = Uniform
lower_bound = 0.5
upper_bound = 2.5
[]
[q]
type = Normal
mean = 100
standard_deviation = 25
[]
[T_0]
type = Normal
mean = 300
standard_deviation = 45
[]
[q_0]
type = Weibull
location = -110
scale = 20
shape = 1
[]
[]
[Samplers]
[hypercube]
type = LatinHypercube
num_rows = 5000
distributions = 'D q T_0 q_0'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = hypercube
input_files = 'diffusion.i'
cli_args = 'Outputs/console=false'
mode = batch-restore
[]
[]
[Transfers]
[parameters]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = hypercube
parameters = 'Materials/constant/prop_values
Kernels/source/value
BCs/left/value
BCs/right/value'
[]
[results]
type = SamplerReporterTransfer
from_multi_app = runner
sampler = hypercube
stochastic_reporter = sampling_matrix
from_reporter = 'T_avg/value q_left/value'
[]
[]
[Reporters]
[sampling_matrix]
type = StochasticMatrix
sampler = hypercube
sampler_column_names = 'D q T_0 q_0'
parallel_type = ROOT
[]
[]
[Outputs]
csv = true
[]
(modules/stochastic_tools/examples/parameter_study/main_vector.i)
[StochasticTools]
[]
[Distributions]
[gamma]
type = Uniform
lower_bound = 0.5
upper_bound = 2.5
[]
[q_0]
type = Weibull
location = -110
scale = 20
shape = 1
[]
[T_0]
type = Normal
mean = 300
standard_deviation = 45
[]
[s]
type = Normal
mean = 100
standard_deviation = 25
[]
[]
[Samplers]
[hypercube]
type = LatinHypercube
num_rows = 5000
distributions = 'gamma q_0 T_0 s'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = hypercube
input_files = 'diffusion_vector.i'
mode = batch-restore
[]
[]
[Transfers]
[parameters]
type = SamplerParameterTransfer
to_multi_app = runner
sampler = hypercube
parameters = 'Materials/constant/prop_values Kernels/source/value BCs/right/value BCs/left/value'
[]
[results]
type = SamplerReporterTransfer
from_multi_app = runner
sampler = hypercube
stochastic_reporter = results
from_reporter = 'acc/T_avg:value acc/q_left:value'
[]
[]
[Reporters]
[results]
type = StochasticReporter
outputs = none
[]
[stats]
type = StatisticsReporter
reporters = 'results/results:acc:T_avg:value results/results:acc:q_left:value'
compute = 'mean stddev'
ci_method = 'percentile'
ci_levels = '0.05 0.95'
[]
[]
[Outputs]
execute_on = 'FINAL'
[out]
type = JSON
[]
[]
(modules/stochastic_tools/examples/surrogates/poly_chaos_normal.i)
[StochasticTools]
[]
[Distributions]
[k_dist]
type = Normal
mean = 5
standard_deviation = 2
[]
[q_dist]
type = Normal
mean = 10000
standard_deviation = 500
[]
[L_dist]
type = Normal
mean = 0.03
standard_deviation = 0.01
[]
[Tinf_dist]
type = Normal
mean = 300
standard_deviation = 10
[]
[]
[Samplers]
[sample]
type = MonteCarlo
num_rows = 100000
distributions = 'k_dist q_dist L_dist Tinf_dist'
execute_on = initial
[]
[]
[Surrogates]
[poly_chaos_avg]
type = PolynomialChaos
filename = 'poly_chaos_training_poly_chaos_avg.rd'
[]
[poly_chaos_max]
type = PolynomialChaos
filename = 'poly_chaos_training_poly_chaos_max.rd'
[]
[]
[Reporters]
[samp]
type = EvaluateSurrogate
model = 'poly_chaos_avg poly_chaos_max'
sampler = sample
parallel_type = ROOT
[]
[stats]
type = PolynomialChaosReporter
pc_name = 'poly_chaos_avg poly_chaos_max'
statistics = 'mean stddev'
local_sensitivity_points = '5 10000 0.03 300; 5 10000 0.03 300'
include_sobol = true
[]
[]
[Outputs]
[out]
type = JSON
execute_on = final
[]
[]
(modules/stochastic_tools/include/distributions/JohnsonSB.h)
// This file is part of the MOOSE framework
// https://mooseframework.inl.gov
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "Normal.h"
/**
* A class used to generate a Johnson SB distribution
*/
class JohnsonSB : public Normal
{
public:
static InputParameters validParams();
JohnsonSB(const InputParameters & parameters);
virtual Real pdf(const Real & x) const override;
virtual Real cdf(const Real & x) const override;
virtual Real quantile(const Real & p) const override;
static Real
pdf(const Real & x, const Real & a, const Real & b, const Real & alpha_1, const Real & alpha_2);
static Real
cdf(const Real & x, const Real & a, const Real & b, const Real & alpha_1, const Real & alpha_2);
static Real quantile(
const Real & p, const Real & a, const Real & b, const Real & alpha_1, const Real & alpha_2);
protected:
/// The lower location parameter, a
const Real & _lower;
/// The upper location parameter, b
const Real & _upper;
/// The first shape parameter, alpha_1
const Real & _alpha_1;
/// The second shape parameter, alpha_2
const Real & _alpha_2;
};
(modules/stochastic_tools/include/distributions/TruncatedNormal.h)
// This file is part of the MOOSE framework
// https://mooseframework.inl.gov
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "Normal.h"
/**
* A class used to generate a truncated normal distribution
*/
class TruncatedNormal : public Normal
{
public:
static InputParameters validParams();
TruncatedNormal(const InputParameters & parameters);
virtual Real pdf(const Real & x) const override;
virtual Real cdf(const Real & x) const override;
virtual Real quantile(const Real & p) const override;
static Real pdf(const Real & x,
const Real & mean,
const Real & std_dev,
const Real & lower_bound,
const Real & upper_bound);
static Real cdf(const Real & x,
const Real & mean,
const Real & std_dev,
const Real & lower_bound,
const Real & upper_bound);
static Real quantile(const Real & p,
const Real & mean,
const Real & std_dev,
const Real & lower_bound,
const Real & upper_bound);
protected:
/// The lower bound for the distribution
const Real & _lower_bound;
/// The upper bound for the distribution
const Real & _upper_bound;
};
(modules/stochastic_tools/include/distributions/NormalDistribution.h)
// This file is part of the MOOSE framework
// https://mooseframework.inl.gov
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "Normal.h"
/**
* A deprecated wrapper class used to generate a normal distribution
*/
class NormalDistribution : public Normal
{
public:
static InputParameters validParams();
NormalDistribution(const InputParameters & parameters);
};