queso-0.56.1
MLSamplingLevelOptions.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2015 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #include <queso/MLSamplingLevelOptions.h>
26 #include <queso/Miscellaneous.h>
27 
28 namespace QUESO {
29 
31  const BaseEnvironment& env,
32  const char* prefix)
33  :
34  m_prefix ((std::string)(prefix) + ""),
35  m_help (UQ_ML_SAMPLING_L_HELP),
37 #else
38  m_checkpointOutputFileName (UQ_ML_SAMPLING_L_CHECKPOINT_OUTPUT_FILE_NAME_ODV),
39 #endif
41  m_dataOutputFileName (UQ_ML_SAMPLING_L_DATA_OUTPUT_FILE_NAME_ODV),
42  m_dataOutputAllowAll (UQ_ML_SAMPLING_L_DATA_OUTPUT_ALLOW_ALL_ODV),
43  //m_dataOutputAllowedSet (),
44  m_str1 (""),
45  m_loadBalanceAlgorithmId (UQ_ML_SAMPLING_L_LOAD_BALANCE_ALGORITHM_ID_ODV),
46  m_loadBalanceTreshold (UQ_ML_SAMPLING_L_LOAD_BALANCE_TRESHOLD_ODV),
47  m_minEffectiveSizeRatio (UQ_ML_SAMPLING_L_MIN_EFFECTIVE_SIZE_RATIO_ODV),
48  m_maxEffectiveSizeRatio (UQ_ML_SAMPLING_L_MAX_EFFECTIVE_SIZE_RATIO_ODV),
49  m_scaleCovMatrix (UQ_ML_SAMPLING_L_SCALE_COV_MATRIX_ODV),
50  m_minRejectionRate (UQ_ML_SAMPLING_L_MIN_REJECTION_RATE_ODV),
51  m_maxRejectionRate (UQ_ML_SAMPLING_L_MAX_REJECTION_RATE_ODV),
52  m_covRejectionRate (UQ_ML_SAMPLING_L_COV_REJECTION_RATE_ODV),
53  m_minAcceptableEta (UQ_ML_SAMPLING_L_MIN_ACCEPTABLE_ETA_ODV), // gpmsa1
54  m_totallyMute (UQ_ML_SAMPLING_L_TOTALLY_MUTE_ODV),
55  m_initialPositionDataInputFileName (UQ_ML_SAMPLING_L_INITIAL_POSITION_DATA_INPUT_FILE_NAME_ODV),
56  m_initialPositionDataInputFileType (UQ_ML_SAMPLING_L_INITIAL_POSITION_DATA_INPUT_FILE_TYPE_ODV),
57  m_initialProposalCovMatrixDataInputFileName(UQ_ML_SAMPLING_L_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_NAME_ODV),
58  m_initialProposalCovMatrixDataInputFileType(UQ_ML_SAMPLING_L_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_TYPE_ODV),
59  m_initialPositionUsePreviousLevelLikelihood(UQ_ML_SAMPLING_L_INITIAL_POSITION_USE_PREVIOUS_LEVEL_LIKELIHOOD_ODV), // ml_likelihood_caching
60  //m_parameterDisabledSet (), // gpmsa2
61  m_str2 (""),
62  m_initialValuesOfDisabledParameters (0),
63  m_str3 (""),
64  m_rawChainDataInputFileName (UQ_ML_SAMPLING_L_RAW_CHAIN_DATA_INPUT_FILE_NAME_ODV),
65  m_rawChainDataInputFileType (UQ_ML_SAMPLING_L_RAW_CHAIN_DATA_INPUT_FILE_TYPE_ODV),
66  m_rawChainSize (UQ_ML_SAMPLING_L_RAW_CHAIN_SIZE_ODV),
67  m_rawChainGenerateExtra (UQ_ML_SAMPLING_L_RAW_CHAIN_GENERATE_EXTRA_ODV),
68  m_rawChainDisplayPeriod (UQ_ML_SAMPLING_L_RAW_CHAIN_DISPLAY_PERIOD_ODV),
69  m_rawChainMeasureRunTimes (UQ_ML_SAMPLING_L_RAW_CHAIN_MEASURE_RUN_TIMES_ODV),
70  m_rawChainDataOutputPeriod (UQ_ML_SAMPLING_L_RAW_CHAIN_DATA_OUTPUT_PERIOD_ODV),
71  m_rawChainDataOutputFileName (UQ_ML_SAMPLING_L_RAW_CHAIN_DATA_OUTPUT_FILE_NAME_ODV),
72  m_rawChainDataOutputFileType (UQ_ML_SAMPLING_L_RAW_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV),
73  m_rawChainDataOutputAllowAll (UQ_ML_SAMPLING_L_RAW_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV),
74  //m_rawChainDataOutputAllowedSet (),
75  m_str4 (""),
76 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
77  m_rawChainComputeStats (UQ_ML_SAMPLING_L_RAW_CHAIN_COMPUTE_STATS_ODV),
78  m_rawChainStatisticalOptionsObj (NULL),
79  m_rawChainStatOptsInstantiated (false),
80 #endif
81  m_filteredChainGenerate (UQ_ML_SAMPLING_L_FILTERED_CHAIN_GENERATE_ODV),
82  m_filteredChainDiscardedPortion (UQ_ML_SAMPLING_L_FILTERED_CHAIN_DISCARDED_PORTION_ODV),
83  m_filteredChainLag (UQ_ML_SAMPLING_L_FILTERED_CHAIN_LAG_ODV),
84  m_filteredChainDataOutputFileName (UQ_ML_SAMPLING_L_FILTERED_CHAIN_DATA_OUTPUT_FILE_NAME_ODV),
85  m_filteredChainDataOutputFileType (UQ_ML_SAMPLING_L_FILTERED_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV),
86  m_filteredChainDataOutputAllowAll (UQ_ML_SAMPLING_L_FILTERED_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV),
87  //m_filteredChainDataOutputAllowedSet (),
88  m_str5 (""),
89 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
90  m_filteredChainComputeStats (UQ_ML_SAMPLING_L_FILTERED_CHAIN_COMPUTE_STATS_ODV),
91  m_filteredChainStatisticalOptionsObj (NULL),
92  m_filteredChainStatOptsInstantiated (false),
93 #endif
94  m_displayCandidates (UQ_ML_SAMPLING_L_DISPLAY_CANDIDATES_ODV),
95  m_putOutOfBoundsInChain (UQ_ML_SAMPLING_L_PUT_OUT_OF_BOUNDS_IN_CHAIN_ODV),
96  m_tkUseLocalHessian (UQ_ML_SAMPLING_L_TK_USE_LOCAL_HESSIAN_ODV),
97  m_tkUseNewtonComponent (UQ_ML_SAMPLING_L_TK_USE_NEWTON_COMPONENT_ODV),
98  m_drMaxNumExtraStages (UQ_ML_SAMPLING_L_DR_MAX_NUM_EXTRA_STAGES_ODV),
99  m_drScalesForExtraStages (0),
100  m_str6 ("1. "),
101  m_drDuringAmNonAdaptiveInt (UQ_ML_SAMPLING_L_DR_DURING_AM_NON_ADAPTIVE_INT_ODV),
102  m_amKeepInitialMatrix (UQ_ML_SAMPLING_L_AM_KEEP_INITIAL_MATRIX_ODV),
103  m_amInitialNonAdaptInterval (UQ_ML_SAMPLING_L_AM_INIT_NON_ADAPT_INT_ODV),
104  m_amAdaptInterval (UQ_ML_SAMPLING_L_AM_ADAPT_INTERVAL_ODV),
105  m_amAdaptedMatricesDataOutputPeriod (UQ_ML_SAMPLING_L_AM_ADAPTED_MATRICES_DATA_OUTPUT_PERIOD_ODV),
106  m_amAdaptedMatricesDataOutputFileName (UQ_ML_SAMPLING_L_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_NAME_ODV),
107  m_amAdaptedMatricesDataOutputFileType (UQ_ML_SAMPLING_L_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_TYPE_ODV),
108  m_amAdaptedMatricesDataOutputAllowAll (UQ_ML_SAMPLING_L_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOW_ALL_ODV),
109  //m_amAdaptedMatricesDataOutputAllowedSet (),
110  m_str7 (""),
111  m_amEta (UQ_ML_SAMPLING_L_AM_ETA_ODV),
112  m_amEpsilon (UQ_ML_SAMPLING_L_AM_EPSILON_ODV),
113  m_env (env),
114 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
115  m_parser(new BoostInputOptionsParser(env.optionsInputFileName())),
116 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
117  m_option_help (m_prefix + "help" ),
119 #else
120  m_option_checkpointOutputFileName (m_prefix + "checkpointOutputFileName" ),
121 #endif
122  m_option_stopAtEnd (m_prefix + "stopAtEnd" ),
123  m_option_dataOutputFileName (m_prefix + "dataOutputFileName" ),
124  m_option_dataOutputAllowAll (m_prefix + "dataOutputAllowAll" ),
125  m_option_dataOutputAllowedSet (m_prefix + "dataOutputAllowedSet" ),
126  m_option_loadBalanceAlgorithmId (m_prefix + "loadBalanceAlgorithmId" ),
127  m_option_loadBalanceTreshold (m_prefix + "loadBalanceTreshold" ),
128  m_option_minEffectiveSizeRatio (m_prefix + "minEffectiveSizeRatio" ),
129  m_option_maxEffectiveSizeRatio (m_prefix + "maxEffectiveSizeRatio" ),
130  m_option_scaleCovMatrix (m_prefix + "scaleCovMatrix" ),
131  m_option_minRejectionRate (m_prefix + "minRejectionRate" ),
132  m_option_maxRejectionRate (m_prefix + "maxRejectionRate" ),
133  m_option_covRejectionRate (m_prefix + "covRejectionRate" ),
134  m_option_minAcceptableEta (m_prefix + "minAcceptableEta" ), // gpmsa1
135  m_option_totallyMute (m_prefix + "totallyMute" ),
136  m_option_initialPosition_dataInputFileName (m_prefix + "initialPosition_dataInputFileName" ),
137  m_option_initialPosition_dataInputFileType (m_prefix + "initialPosition_dataInputFileType" ),
138  m_option_initialProposalCovMatrix_dataInputFileName(m_prefix + "initialProposalCovMatrix_dataInputFileName"),
139  m_option_initialProposalCovMatrix_dataInputFileType(m_prefix + "initialProposalCovMatrix_dataInputFileType"),
140  m_option_initialPositionUsePreviousLevelLikelihood (m_prefix + "initialPositionUsePreviousLevelLikelihood" ), // ml_likelihood_caching
141  m_option_listOfDisabledParameters (m_prefix + "listOfDisabledParameters" ), // gpmsa2
142  m_option_initialValuesOfDisabledParameters (m_prefix + "initialValuesOfDisabledParameters" ), // gpmsa2
143  m_option_rawChain_dataInputFileName (m_prefix + "rawChain_dataInputFileName" ),
144  m_option_rawChain_dataInputFileType (m_prefix + "rawChain_dataInputFileType" ),
145  m_option_rawChain_size (m_prefix + "rawChain_size" ),
146  m_option_rawChain_generateExtra (m_prefix + "rawChain_generateExtra" ),
147  m_option_rawChain_displayPeriod (m_prefix + "rawChain_displayPeriod" ),
148  m_option_rawChain_measureRunTimes (m_prefix + "rawChain_measureRunTimes" ),
149  m_option_rawChain_dataOutputPeriod (m_prefix + "rawChain_dataOutputPeriod" ),
150  m_option_rawChain_dataOutputFileName (m_prefix + "rawChain_dataOutputFileName" ),
151  m_option_rawChain_dataOutputFileType (m_prefix + "rawChain_dataOutputFileType" ),
152  m_option_rawChain_dataOutputAllowAll (m_prefix + "rawChain_dataOutputAllowAll" ),
153  m_option_rawChain_dataOutputAllowedSet (m_prefix + "rawChain_dataOutputAllowedSet" ),
154 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
155  m_option_rawChain_computeStats (m_prefix + "rawChain_computeStats" ),
156 #endif
157  m_option_filteredChain_generate (m_prefix + "filteredChain_generate" ),
158  m_option_filteredChain_discardedPortion (m_prefix + "filteredChain_discardedPortion" ),
159  m_option_filteredChain_lag (m_prefix + "filteredChain_lag" ),
160  m_option_filteredChain_dataOutputFileName (m_prefix + "filteredChain_dataOutputFileName" ),
161  m_option_filteredChain_dataOutputFileType (m_prefix + "filteredChain_dataOutputFileType" ),
162  m_option_filteredChain_dataOutputAllowAll (m_prefix + "filteredChain_dataOutputAllowAll" ),
163  m_option_filteredChain_dataOutputAllowedSet (m_prefix + "filteredChain_dataOutputAllowedSet" ),
164 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
165  m_option_filteredChain_computeStats (m_prefix + "filteredChain_computeStats" ),
166 #endif
167  m_option_displayCandidates (m_prefix + "displayCandidates" ),
168  m_option_putOutOfBoundsInChain (m_prefix + "putOutOfBoundsInChain" ),
169  m_option_tk_useLocalHessian (m_prefix + "tk_useLocalHessian" ),
170  m_option_tk_useNewtonComponent (m_prefix + "tk_useNewtonComponent" ),
171  m_option_dr_maxNumExtraStages (m_prefix + "dr_maxNumExtraStages" ),
172  m_option_dr_listOfScalesForExtraStages (m_prefix + "dr_listOfScalesForExtraStages" ),
173  m_option_dr_duringAmNonAdaptiveInt (m_prefix + "dr_duringAmNonAdaptiveInt" ),
174  m_option_am_keepInitialMatrix (m_prefix + "am_keepInitialMatrix" ),
175  m_option_am_initialNonAdaptInterval (m_prefix + "am_initialNonAdaptInterval" ),
176  m_option_am_adaptInterval (m_prefix + "am_adaptInterval" ),
177  m_option_am_adaptedMatrices_dataOutputPeriod (m_prefix + "amAdaptedMatrices_dataOutputPeriod" ),
178  m_option_am_adaptedMatrices_dataOutputFileName (m_prefix + "amAdaptedMatrices_dataOutputFileName" ),
179  m_option_am_adaptedMatrices_dataOutputFileType (m_prefix + "amAdaptedMatrices_dataOutputFileType" ),
180  m_option_am_adaptedMatrices_dataOutputAllowAll (m_prefix + "amAdaptedMatrices_dataOutputAllowAll" ),
181  m_option_am_adaptedMatrices_dataOutputAllowedSet (m_prefix + "amAdaptedMatrices_dataOutputAllowedSet" ),
182  m_option_am_eta (m_prefix + "am_eta" ),
183  m_option_am_epsilon (m_prefix + "am_epsilon" ),
184  m_option_doLogitTransform (m_prefix + "doLogitTransform" ),
185  m_option_algorithm (m_prefix + "algorithm" ),
186  m_option_tk (m_prefix + "tk" )
187 {
188 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
189  this->defineAllOptions();
191 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
192  this->getAllOptions();
193 
194  checkOptions(&env);
195 }
196 
197 void
199 {
200 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
201  m_parser->registerOption<std::string >(m_option_help, UQ_ML_SAMPLING_L_HELP , "produce help message for Bayesian Markov chain distr. calculator");
202 #ifdef ML_CODE_HAS_NEW_RESTART_CAPABILITY
203 #else
204  m_parser->registerOption<std::string >(m_option_checkpointOutputFileName, m_checkpointOutputFileName , "name of checpoint output file" );
205 #endif
206  m_parser->registerOption<bool >(m_option_stopAtEnd, m_stopAtEnd , "stop at end of such level" );
207  m_parser->registerOption<std::string >(m_option_dataOutputFileName, m_dataOutputFileName , "name of generic output file" );
208  m_parser->registerOption<bool >(m_option_dataOutputAllowAll, m_dataOutputAllowAll , "subEnvs that will write to generic output file" );
209  m_parser->registerOption<std::string >(m_option_dataOutputAllowedSet, m_str1 , "subEnvs that will write to generic output file" );
210  m_parser->registerOption<unsigned int>(m_option_loadBalanceAlgorithmId, m_loadBalanceAlgorithmId , "Perform load balancing with chosen algorithm (0 = no balancing)" );
211  m_parser->registerOption<double >(m_option_loadBalanceTreshold, m_loadBalanceTreshold , "Perform load balancing if load unbalancing ratio > treshold" );
212  m_parser->registerOption<double >(m_option_minEffectiveSizeRatio, m_minEffectiveSizeRatio , "minimum allowed effective size ratio wrt previous level" );
213  m_parser->registerOption<double >(m_option_maxEffectiveSizeRatio, m_maxEffectiveSizeRatio , "maximum allowed effective size ratio wrt previous level" );
214  m_parser->registerOption<bool >(m_option_scaleCovMatrix, m_scaleCovMatrix , "scale proposal covariance matrix" );
215  m_parser->registerOption<double >(m_option_minRejectionRate, m_minRejectionRate , "minimum allowed attempted rejection rate at current level" );
216  m_parser->registerOption<double >(m_option_maxRejectionRate, m_maxRejectionRate , "maximum allowed attempted rejection rate at current level" );
217  m_parser->registerOption<double >(m_option_covRejectionRate, m_covRejectionRate , "c.o.v. for judging attempted rejection rate at current level" );
218  m_parser->registerOption<double >(m_option_minAcceptableEta, m_minAcceptableEta , "min acceptable eta" );
219  m_parser->registerOption<bool >(m_option_totallyMute, m_totallyMute , "totally mute (no printout message)" );
220  m_parser->registerOption<std::string >(m_option_initialPosition_dataInputFileName, m_initialPositionDataInputFileName , "name of input file for initial position" );
221  m_parser->registerOption<std::string >(m_option_initialPosition_dataInputFileType, m_initialPositionDataInputFileType , "type of input file for initial position" );
222  m_parser->registerOption<std::string >(m_option_initialProposalCovMatrix_dataInputFileName, m_initialProposalCovMatrixDataInputFileName, "name of input file for initial proposal covariance matrix" );
223  m_parser->registerOption<std::string >(m_option_initialProposalCovMatrix_dataInputFileType, m_initialProposalCovMatrixDataInputFileType, "type of input file for initial proposal covariance matrix" );
224  m_parser->registerOption<bool >(m_option_initialPositionUsePreviousLevelLikelihood, m_initialPositionUsePreviousLevelLikelihood, "use previous level likelihood for initial chain position instead of re-computing from target pdf");
225  m_parser->registerOption<std::string >(m_option_listOfDisabledParameters, m_str2 , "list of disabled parameters" ); // gpmsa2
226  m_parser->registerOption<std::string >(m_option_initialValuesOfDisabledParameters, m_str3 , "initial values of disabled parameters" ); // gpmsa2
227  m_parser->registerOption<std::string >(m_option_rawChain_dataInputFileName, m_rawChainDataInputFileName , "name of input file for raw chain " );
228  m_parser->registerOption<std::string >(m_option_rawChain_dataInputFileType, m_rawChainDataInputFileType , "type of input file for raw chain " );
229  m_parser->registerOption<unsigned int>(m_option_rawChain_size, m_rawChainSize , "size of raw chain" );
230  m_parser->registerOption<bool >(m_option_rawChain_generateExtra, m_rawChainGenerateExtra , "generate extra information about raw chain" );
231  m_parser->registerOption<unsigned int>(m_option_rawChain_displayPeriod, m_rawChainDisplayPeriod , "period of message display during raw chain generation" );
233  m_parser->registerOption<unsigned int>(m_option_rawChain_dataOutputPeriod, m_rawChainDataOutputPeriod , "period of message display during raw chain generation" );
234  m_parser->registerOption<std::string >(m_option_rawChain_dataOutputFileName, m_rawChainDataOutputFileName , "name of output file for raw chain " );
235  m_parser->registerOption<std::string >(m_option_rawChain_dataOutputFileType, m_rawChainDataOutputFileType , "type of output file for raw chain " );
236  m_parser->registerOption<bool >(m_option_rawChain_dataOutputAllowAll, m_rawChainDataOutputAllowAll , "subEnvs that will write to output file for raw chain" );
237  m_parser->registerOption<std::string >(m_option_rawChain_dataOutputAllowedSet, m_str4 , "subEnvs that will write to output file for raw chain" );
238 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
239  m_parser->registerOption<bool >(m_option_rawChain_computeStats, m_rawChainComputeStats , "compute statistics on raw chain" );
240 #endif
242  m_parser->registerOption<double >(m_option_filteredChain_discardedPortion, m_filteredChainDiscardedPortion , "initial discarded portion for chain filtering" );
243  m_parser->registerOption<unsigned int>(m_option_filteredChain_lag, m_filteredChainLag , "spacing for chain filtering" );
244  m_parser->registerOption<std::string >(m_option_filteredChain_dataOutputFileName, m_filteredChainDataOutputFileName , "name of output file for filtered chain" );
245  m_parser->registerOption<std::string >(m_option_filteredChain_dataOutputFileType, m_filteredChainDataOutputFileType , "type of output file for filtered chain" );
246  m_parser->registerOption<bool >(m_option_filteredChain_dataOutputAllowAll, m_filteredChainDataOutputAllowAll , "subEnvs that will write to output file for filtered chain" );
247  m_parser->registerOption<std::string >(m_option_filteredChain_dataOutputAllowedSet, m_str5 , "subEnvs that will write to output file for filtered chain" );
248 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
249  m_parser->registerOption<bool >(m_option_filteredChain_computeStats, m_filteredChainComputeStats , "compute statistics on filtered chain" );
250 #endif
251  m_parser->registerOption<bool >(m_option_displayCandidates, m_displayCandidates , "display candidates generated in the core MH algorithm" );
252  m_parser->registerOption<bool >(m_option_putOutOfBoundsInChain, m_putOutOfBoundsInChain , "put 'out of bound' candidates in chain as well" );
253  m_parser->registerOption<bool >(m_option_tk_useLocalHessian, m_tkUseLocalHessian , "'proposal' use local Hessian" );
254  m_parser->registerOption<bool >(m_option_tk_useNewtonComponent, m_tkUseNewtonComponent , "'proposal' use Newton component" );
255  m_parser->registerOption<unsigned int>(m_option_dr_maxNumExtraStages, m_drMaxNumExtraStages , "'dr' maximum number of extra stages" );
256  m_parser->registerOption<std::string >(m_option_dr_listOfScalesForExtraStages, m_str6 , "'dr' list of scales for proposal cov matrices from 2nd stage on" );
257  m_parser->registerOption<bool >(m_option_dr_duringAmNonAdaptiveInt, m_drDuringAmNonAdaptiveInt , "'dr' used during 'am' non adaptive interval" );
258  m_parser->registerOption<bool >(m_option_am_keepInitialMatrix, m_amKeepInitialMatrix , "'am' keep initial (given) matrix" );
259  m_parser->registerOption<unsigned int>(m_option_am_initialNonAdaptInterval, m_amInitialNonAdaptInterval , "'am' initial non adaptation interval" );
260  m_parser->registerOption<unsigned int>(m_option_am_adaptInterval, m_amAdaptInterval , "'am' adaptation interval" );
261  m_parser->registerOption<unsigned int>(m_option_am_adaptedMatrices_dataOutputPeriod, m_amAdaptedMatricesDataOutputPeriod , "period for outputing 'am' adapted matrices" );
262  m_parser->registerOption<std::string >(m_option_am_adaptedMatrices_dataOutputFileName, m_amAdaptedMatricesDataOutputFileName , "name of output file for 'am' adapted matrices" );
263  m_parser->registerOption<std::string >(m_option_am_adaptedMatrices_dataOutputFileType, m_amAdaptedMatricesDataOutputFileType , "type of output file for 'am' adapted matrices" );
264  m_parser->registerOption<bool >(m_option_am_adaptedMatrices_dataOutputAllowAll, m_amAdaptedMatricesDataOutputAllowAll , "type of output file for 'am' adapted matrices" );
265  m_parser->registerOption<std::string >(m_option_am_adaptedMatrices_dataOutputAllowedSet, m_str7 , "type of output file for 'am' adapted matrices" );
266  m_parser->registerOption<double >(m_option_am_eta, m_amEta , "'am' eta" );
267  m_parser->registerOption<double >(m_option_am_epsilon, m_amEpsilon , "'am' epsilon" );
268  m_parser->registerOption<bool >(m_option_doLogitTransform, UQ_ML_SAMPLING_L_DO_LOGIT_TRANSFORM , "flag for doing logit transform for bounded domains" );
269  m_parser->registerOption<std::string >(m_option_algorithm, UQ_ML_SAMPLING_L_ALGORITHM , "which algorithm to use for sampling" );
270  m_parser->registerOption<std::string >(m_option_tk, UQ_ML_SAMPLING_L_TK , "which transition kernel to use for sampling" );
271 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
272 }
273 
274 void
276 {
277 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
278  m_parser->getOption<std::string >(m_option_help, m_help);
279 #ifdef ML_CODE_HAS_NEW_RESTART_CAPABILITY
280 #else
282 #endif
302  m_parser->getOption<std::set<unsigned int> >(m_option_listOfDisabledParameters, m_parameterDisabledSet); // gpmsa2
315 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
316  m_parser->getOption<bool >(m_option_rawChain_computeStats, m_rawChainComputeStats );
317 #endif
325 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
326  m_parser->getOption<bool >(m_option_filteredChain_computeStats, m_filteredChainComputeStats );
327 #endif
347  m_parser->getOption<std::string >(m_option_tk, m_tk);
348 #else
350 #ifdef ML_CODE_HAS_NEW_RESTART_CAPABILITY
351 #else
353 #endif
357 
358  // Is the empty set (string) by default
359  unsigned int size = m_env.input().vector_variable_size(m_option_dataOutputAllowedSet);
360  for (unsigned int i = 0; i < size; i++) {
361  // We default to empty set, so the default values are actually never
362  // used here
363  unsigned int allowed = m_env.input()(m_option_dataOutputAllowedSet, i, i);
364  m_dataOutputAllowedSet.insert(allowed);
365  }
366 
382 
383  // Is the empty set (string) by default
384  size = m_env.input().vector_variable_size(m_option_listOfDisabledParameters);
385  for (unsigned int i = 0; i < size; i++) {
386  // We default to empty set, so the default values are actually never
387  // used here
388  unsigned int allowed = m_env.input()(m_option_listOfDisabledParameters, i, i);
389  m_parameterDisabledSet.insert(allowed);
390  }
391 
392  // Is the empty set (string) by default
393  size = m_env.input().vector_variable_size(m_option_initialValuesOfDisabledParameters);
394  for (unsigned int i = 0; i < size; i++) {
395  // We default to empty set, so the default values are actually never
396  // used here
397  unsigned int value = m_env.input()(m_option_initialValuesOfDisabledParameters, i, i);
398  m_initialValuesOfDisabledParameters.push_back(value);
399  }
400 
411 
412  // Is the empty set (string) by default
413  size = m_env.input().vector_variable_size(m_option_rawChain_dataOutputAllowedSet);
414  for (unsigned int i = 0; i < size; i++) {
415  // We default to empty set, so the default values are actually never
416  // used here
417  unsigned int allowed = m_env.input()(m_option_rawChain_dataOutputAllowedSet, i, i);
418  m_rawChainDataOutputAllowedSet.insert(allowed);
419  }
420 
421 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
422  m_rawChainComputeStats = m_env.input()(m_option_rawChain_computeStats, m_rawChainComputeStats );
423 #endif
430 
431  // Is the empty set (string) by default
432  size = m_env.input().vector_variable_size(m_option_filteredChain_dataOutputAllowedSet);
433  for (unsigned int i = 0; i < size; i++) {
434  // We default to empty set, so the default values are actually never
435  // used here
436  unsigned int allowed = m_env.input()(m_option_filteredChain_dataOutputAllowedSet, i, i);
437  m_filteredChainDataOutputAllowedSet.insert(allowed);
438  }
439 
440 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
441  m_filteredChainComputeStats = m_env.input()(m_option_filteredChain_computeStats, m_filteredChainComputeStats );
442 #endif
448 
449  // Is the empty set (string) by default
450  size = m_env.input().vector_variable_size(m_option_dr_listOfScalesForExtraStages);
451 
452  m_drScalesForExtraStages.clear();
453  for (unsigned int i = 0; i < size; i++) {
454  unsigned int value = m_env.input()(m_option_dr_listOfScalesForExtraStages, i, i);
455  m_drScalesForExtraStages.push_back(value);
456  }
457 
466 
467  size = m_env.input().vector_variable_size(m_option_am_adaptedMatrices_dataOutputAllowedSet);
468  for (unsigned int i = 0; i < size; i++) {
469  // We default to empty set, so the default values are actually never
470  // used here
471  unsigned int allowed = m_env.input()(m_option_am_adaptedMatrices_dataOutputAllowedSet, i, i);
473  }
474 
480 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
481 }
482 
483 void
485 {
486 #ifdef ML_CODE_HAS_NEW_RESTART_CAPABILITY
487 #else
489 #endif
490  m_stopAtEnd = srcOptions.m_stopAtEnd;
494  m_str1 = srcOptions.m_str1;
499  m_scaleCovMatrix = srcOptions.m_scaleCovMatrix;
503  m_minAcceptableEta = srcOptions.m_minAcceptableEta; // gpmsa1
504  m_totallyMute = srcOptions.m_totallyMute;
510  m_parameterDisabledSet = srcOptions.m_parameterDisabledSet; // gpmsa2
511  m_str2 = srcOptions.m_str2; // gpmsa2
513  m_str3 = srcOptions.m_str3;
516  m_rawChainSize = srcOptions.m_rawChainSize;
517 //std::cout << "In copy(), rawChainSize = " << m_rawChainSize << std::endl;
526  m_str4 = srcOptions.m_str4;
527 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
528  m_rawChainComputeStats = srcOptions.m_rawChainComputeStats;
529  m_rawChainStatisticalOptionsObj = NULL; // Yes, 'NULL'
530  m_rawChainStatOptsInstantiated = false;
531 #endif
539  m_str5 = srcOptions.m_str5;
540 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
541  m_filteredChainComputeStats = srcOptions.m_filteredChainComputeStats;
542  m_filteredChainStatisticalOptionsObj = NULL; // Yes, 'NULL'
543  m_filteredChainStatOptsInstantiated = false;
544 #endif
551  m_str6 = srcOptions.m_str6;
561  m_str7 = srcOptions.m_str7;
562  m_amEta = srcOptions.m_amEta;
563  m_amEpsilon = srcOptions.m_amEpsilon;
565  m_algorithm = srcOptions.m_algorithm;
566  m_tk = srcOptions.m_tk;
567 
568  return;
569 }
570 
572 {
573  //std::cout << "In MLSamplingLevelOptions::destructor()"
574  // << ": m_filteredChainStatOptsInstantiated = " << m_filteredChainStatOptsInstantiated
575  // << ", m_rawChainStatOptsInstantiated = " << m_rawChainStatOptsInstantiated
576  // << std::endl;
577  //sleep(1);
578 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
579  if (m_filteredChainStatOptsInstantiated) delete m_filteredChainStatisticalOptionsObj;
580  if (m_rawChainStatOptsInstantiated ) delete m_rawChainStatisticalOptionsObj;
581 #endif
582 }
583 
584 void
586 {
588 
589  // FIXME
590  if (defaultOptions) this->copyOptionsValues(*defaultOptions);
591 
592 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
593  // Replace the parser since default values changed
594  if (m_parser) {
595  delete m_parser;
597  }
598 
599  // FIXME: Does this work with GetPot?
600  this->defineAllOptions();
602 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
603  this->getAllOptions();
604 
605 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
606  if (m_rawChainComputeStats) {
607  m_rawChainStatisticalOptionsObj = new SequenceStatisticalOptions(m_env,m_prefix + "rawChain_");
608  m_rawChainStatOptsInstantiated = true;
609  }
610  if (m_filteredChainComputeStats) {
611  m_filteredChainStatisticalOptionsObj = new SequenceStatisticalOptions(m_env,m_prefix + "filteredChain_");
612  m_filteredChainStatOptsInstantiated = true;
613  }
614 #endif
615 }
616 
617 void
619 {
620  char tmpStr[64];
621 
622  // DM: Print here because I don't know where the class is instantiated
623  if (m_help != "") {
624  if (m_env.subDisplayFile()) {
625  *m_env.subDisplayFile() << (*this) << std::endl;
626  }
627  }
628 
629  if (m_dataOutputAllowAll) {
630  m_dataOutputAllowedSet.clear();
632  }
633 
634  // DM: Not sure what this is for
635  m_str1.clear();
636  for (std::set<unsigned int>::iterator setIt = m_dataOutputAllowedSet.begin(); setIt != m_dataOutputAllowedSet.end(); ++setIt) {
637  sprintf(tmpStr,"%d",(int)(*setIt));
638  m_str1 += tmpStr;
639  m_str1 += " ";
640  }
641 
642  queso_require_less_msg(m_minEffectiveSizeRatio, 1.0, "option `" << m_option_minEffectiveSizeRatio << "` must be less than 1.0");
643  queso_require_less_msg(m_maxEffectiveSizeRatio, 1.0, "option `" << m_option_maxEffectiveSizeRatio << "` must be less than 1.0");
644  queso_require_less_msg(m_minRejectionRate, 1.0, "option `" << m_option_minRejectionRate << "` must be less than 1.0");
645  queso_require_less_msg(m_maxRejectionRate, 1.0, "option `" << m_option_maxRejectionRate << "` must be less than 1.0");
646  queso_require_less_msg(m_covRejectionRate, 1.0, "option `" << m_option_covRejectionRate << "` must be less than 1.0");
647 
648  // DM: Not sure what this is for
649  m_str2.clear();
650  for (std::set<unsigned int>::iterator setIt = m_parameterDisabledSet.begin(); setIt != m_parameterDisabledSet.end(); ++setIt) { // gpmsa2
651  sprintf(tmpStr,"%d",(int)(*setIt));
652  m_str2 += tmpStr;
653  m_str2 += " ";
654  }
655 
656  // DM: Not sure what this is for
657  m_str3.clear();
658  for (unsigned int i = 0; i < m_initialValuesOfDisabledParameters.size(); ++i) {
659  sprintf(tmpStr,"%e",m_initialValuesOfDisabledParameters[i]);
660  m_str3 += tmpStr;
661  m_str3 += " ";
662  }
663 
667  }
668 
669  // DM: Not sure what this is for
670  m_str4.clear();
671  for (std::set<unsigned int>::iterator setIt = m_rawChainDataOutputAllowedSet.begin(); setIt != m_rawChainDataOutputAllowedSet.end(); ++setIt) {
672  sprintf(tmpStr,"%d",(int)(*setIt));
673  m_str4 += tmpStr;
674  m_str4 += " ";
675  }
676 
677  if (m_filteredChainGenerate == true) {
678  queso_require_greater_equal_msg(m_filteredChainLag, 2, "option `" << m_option_filteredChain_lag << "` must be at least 2");
679  }
680 
684  }
685 
686  // DM: Not sure what this is for
687  m_str5.clear();
688  for (std::set<unsigned int>::iterator setIt = m_filteredChainDataOutputAllowedSet.begin(); setIt != m_filteredChainDataOutputAllowedSet.end(); ++setIt) {
689  sprintf(tmpStr,"%d",(int)(*setIt));
690  m_str5 += tmpStr;
691  m_str5 += " ";
692  }
693 
694  if (m_drMaxNumExtraStages > 0) {
695  unsigned int size = m_drScalesForExtraStages.size();
696 
697  // If we asked more stages than scales provided, pad with ones
698  if (m_drMaxNumExtraStages > size) {
699  for (unsigned int i = size; i < m_drMaxNumExtraStages; i++) {
700  double scale = 1.0;
701  m_drScalesForExtraStages.push_back(scale);
702  }
703  }
704  }
705 
706  // DM: Not sure what this is for
707  m_str6.clear();
708  for (unsigned int i = 0; i < m_drScalesForExtraStages.size(); ++i) {
709  sprintf(tmpStr,"%e",m_drScalesForExtraStages[i]);
710  m_str6 += tmpStr;
711  m_str6 += " ";
712  }
713 
717  }
718 
719  // DM: Not sure what this is for
720  m_str7.clear();
721  for (std::set<unsigned int>::iterator setIt = m_amAdaptedMatricesDataOutputAllowedSet.begin(); setIt != m_amAdaptedMatricesDataOutputAllowedSet.end(); ++setIt) {
722  sprintf(tmpStr,"%d",(int)(*setIt));
723  m_str7 += tmpStr;
724  m_str7 += " ";
725  }
726 }
727 
728 void
729 MLSamplingLevelOptions::print(std::ostream& os) const
730 {
731  os << "m_prefix" << " = " << m_prefix
732 #ifdef ML_CODE_HAS_NEW_RESTART_CAPABILITY
733 #else
735 #endif
736  << "\n" << m_option_stopAtEnd << " = " << m_stopAtEnd
739  << "\n" << m_option_dataOutputAllowedSet << " = ";
740  for (std::set<unsigned int>::iterator setIt = m_dataOutputAllowedSet.begin(); setIt != m_dataOutputAllowedSet.end(); ++setIt) {
741  os << *setIt << " ";
742  }
747  << "\n" << m_option_scaleCovMatrix << " = " << m_scaleCovMatrix
748  << "\n" << m_option_minRejectionRate << " = " << m_minRejectionRate
749  << "\n" << m_option_maxRejectionRate << " = " << m_maxRejectionRate
750  << "\n" << m_option_covRejectionRate << " = " << m_covRejectionRate
751  << "\n" << m_option_minAcceptableEta << " = " << m_minAcceptableEta // gpmsa1
752  << "\n" << m_option_totallyMute << " = " << m_totallyMute
758  << "\n" << m_option_listOfDisabledParameters << " = "; // gpmsa2
759  for (std::set<unsigned int>::iterator setIt = m_parameterDisabledSet.begin(); setIt != m_parameterDisabledSet.end(); ++setIt) {
760  os << *setIt << " ";
761  }
762  os << "\n" << m_option_initialValuesOfDisabledParameters << " = "; // gpmsa2
763  for (unsigned int i = 0; i < m_initialValuesOfDisabledParameters.size(); ++i) {
764  os << m_initialValuesOfDisabledParameters[i] << " ";
765  }
768  << "\n" << m_option_rawChain_size << " = " << m_rawChainSize
776  << "\n" << m_option_rawChain_dataOutputAllowedSet << " = ";
777  for (std::set<unsigned int>::iterator setIt = m_rawChainDataOutputAllowedSet.begin(); setIt != m_rawChainDataOutputAllowedSet.end(); ++setIt) {
778  os << *setIt << " ";
779  }
780  os
781 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
782  << "\n" << m_option_rawChain_computeStats << " = " << m_rawChainComputeStats
783 #endif
786  << "\n" << m_option_filteredChain_lag << " = " << m_filteredChainLag
791  for (std::set<unsigned int>::iterator setIt = m_filteredChainDataOutputAllowedSet.begin(); setIt != m_filteredChainDataOutputAllowedSet.end(); ++setIt) {
792  os << *setIt << " ";
793  }
794  os
795 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
796  << "\n" << m_option_filteredChain_computeStats << " = " << m_filteredChainComputeStats
797 #endif
798  << "\n" << m_option_displayCandidates << " = " << m_displayCandidates
800  << "\n" << m_option_tk_useLocalHessian << " = " << m_tkUseLocalHessian
803  << "\n" << m_option_dr_listOfScalesForExtraStages << " = ";
804  for (unsigned int i = 0; i < m_drScalesForExtraStages.size(); ++i) {
805  os << m_drScalesForExtraStages[i] << " ";
806  }
810  << "\n" << m_option_am_adaptInterval << " = " << m_amAdaptInterval
816  for (std::set<unsigned int>::iterator setIt = m_amAdaptedMatricesDataOutputAllowedSet.begin(); setIt != m_amAdaptedMatricesDataOutputAllowedSet.end(); ++setIt) {
817  os << *setIt << " ";
818  }
819  os << "\n" << m_option_am_eta << " = " << m_amEta
820  << "\n" << m_option_am_epsilon << " = " << m_amEpsilon
821  << "\n" << m_option_doLogitTransform << " = " << m_doLogitTransform
822  << "\n" << m_option_algorithm << " = " << m_algorithm
823  << "\n" << m_option_tk << " = " << m_tk
824  << std::endl;
825 
826  return;
827 }
828 
829 const BaseEnvironment&
831 {
832  return m_env;
833 }
834 
835 std::ostream& operator<<(std::ostream& os, const MLSamplingLevelOptions& obj)
836 {
837 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
838  os << (*(obj.m_parser)) << std::endl;
839 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
840  obj.print(os);
841  return os;
842 }
843 
844 } // End namespace QUESO
double m_filteredChainDiscardedPortion
Initial discarded portion for chain filtering.
std::string m_option_am_adaptedMatrices_dataOutputAllowAll
#define UQ_ML_SAMPLING_L_DATA_OUTPUT_ALLOW_ALL_ODV
void copyOptionsValues(const MLSamplingLevelOptions &srcOptions)
Copies the option values from srcOptions to this.
#define UQ_ML_SAMPLING_L_LOAD_BALANCE_TRESHOLD_ODV
double m_maxEffectiveSizeRatio
Maximum allowed effective size ratio wrt previous level.
double m_amEta
&#39;am&#39; eta.
bool m_drDuringAmNonAdaptiveInt
Whether or not &#39;dr&#39; is used during &#39;am&#39; non adaptive interval.
#define UQ_ML_SAMPLING_L_TK_USE_LOCAL_HESSIAN_ODV
bool m_filteredChainGenerate
Whether or not to generate filtered chain.
#define UQ_ML_SAMPLING_L_AM_ADAPT_INTERVAL_ODV
#define UQ_ML_SAMPLING_L_RAW_CHAIN_DATA_INPUT_FILE_NAME_ODV
double m_amEpsilon
&#39;am&#39; epsilon.
#define UQ_ML_SAMPLING_L_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_TYPE_ODV
bool m_rawChainGenerateExtra
Generate extra information about raw chain.
#define UQ_ML_SAMPLING_L_TK
virtual ~MLSamplingLevelOptions()
Destructor.
const GetPot & input() const
The GetPot input file parser.
Definition: Environment.C:1148
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:320
std::string m_option_initialProposalCovMatrix_dataInputFileType
#define queso_require_greater_equal_msg(expr1, expr2, msg)
Definition: asserts.h:78
double m_covRejectionRate
c.o.v. for judging attempted rejection rate at current level.
double m_minEffectiveSizeRatio
Minimum allowed effective size ratio wrt previous level.
#define UQ_ML_SAMPLING_L_PUT_OUT_OF_BOUNDS_IN_CHAIN_ODV
bool m_putOutOfBoundsInChain
Put &#39;out of bound&#39; candidates in chain as well.
std::string m_initialProposalCovMatrixDataInputFileType
Type of input file for initial proposal covariance matrix.
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
Definition: Environment.C:353
std::string m_dataOutputFileName
Name of generic output file.
std::string m_tk
Which transition kernel to use for sampling.
#define UQ_ML_SAMPLING_L_MAX_REJECTION_RATE_ODV
double m_minRejectionRate
minimum allowed attempted rejection rate at current level
#define UQ_ML_SAMPLING_L_INITIAL_POSITION_DATA_INPUT_FILE_TYPE_ODV
#define UQ_ML_SAMPLING_L_INITIAL_POSITION_USE_PREVIOUS_LEVEL_LIKELIHOOD_ODV
#define ML_CODE_HAS_NEW_RESTART_CAPABILITY
Definition: Defines.h:78
bool m_initialPositionUsePreviousLevelLikelihood
Use previous level likelihood for initial chain position instead of re-computing it from target pdf...
std::string m_option_am_adaptedMatrices_dataOutputFileType
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:197
double scale
Definition: ann2fig.cpp:85
#define UQ_ML_SAMPLING_L_DISPLAY_CANDIDATES_ODV
#define UQ_ML_SAMPLING_L_RAW_CHAIN_MEASURE_RUN_TIMES_ODV
std::set< unsigned int > m_rawChainDataOutputAllowedSet
subEnvs that will write to output file for raw chain.
#define UQ_ML_SAMPLING_L_RAW_CHAIN_DATA_OUTPUT_FILE_NAME_ODV
void checkOptions(const BaseEnvironment *env)
#define UQ_ML_SAMPLING_L_HELP
unsigned int m_rawChainSize
Size of raw chain.
std::string m_initialPositionDataInputFileType
Type of input file for initial position.
bool m_scaleCovMatrix
Whether or not scale proposal covariance matrix.
#define UQ_ML_SAMPLING_L_RAW_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV
unsigned int m_filteredChainLag
Spacing for chain filtering.
#define UQ_ML_SAMPLING_L_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_TYPE_ODV
#define UQ_ML_SAMPLING_L_RAW_CHAIN_SIZE_ODV
std::set< unsigned int > m_amAdaptedMatricesDataOutputAllowedSet
subEnvs that will write to output file for &#39;am&#39; adapted matrices.
unsigned vector_variable_size(const char *VarName) const
Definition: getpot.h:2532
void getOption(std::string &name, T &value)
Get option name from the parser and set value to the parsed value.
#define UQ_ML_SAMPLING_L_CHECKPOINT_OUTPUT_FILE_NAME_ODV
bool m_dataOutputAllowAll
subEnvs that will write to generic output file.
bool m_doLogitTransform
Whether or not a logit transform will be done for bounded domains.
std::string m_amAdaptedMatricesDataOutputFileType
Type of output file for &#39;am&#39; adapted matrices.
#define UQ_ML_SAMPLING_L_DO_LOGIT_TRANSFORM
#define UQ_ML_SAMPLING_L_FILTERED_CHAIN_DATA_OUTPUT_FILE_NAME_ODV
#define queso_require_less_msg(expr1, expr2, msg)
Definition: asserts.h:75
double m_loadBalanceTreshold
Perform load balancing if load unbalancing ratio &gt; threshold.
bool m_tkUseNewtonComponent
Whether or not &#39;proposal&#39; uses Newton component.
unsigned int subId() const
Access function to the number of each sub-environment Id: m_subId.
Definition: Environment.C:341
#define UQ_ML_SAMPLING_L_AM_EPSILON_ODV
std::string m_option_am_adaptedMatrices_dataOutputFileName
bool m_rawChainMeasureRunTimes
Whether or not to measure run times.
#define UQ_ML_SAMPLING_L_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOW_ALL_ODV
#define queso_deprecated()
Definition: Defines.h:134
#define UQ_ML_SAMPLING_L_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_NAME_ODV
#define UQ_ML_SAMPLING_L_DATA_OUTPUT_FILE_NAME_ODV
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
unsigned int m_drMaxNumExtraStages
&#39;dr&#39; maximum number of extra stages.
double m_minAcceptableEta
minimum acceptable eta,
std::set< unsigned int > m_parameterDisabledSet
bool m_totallyMute
Whether or not to be totally mute (no printout message).
bool m_tkUseLocalHessian
Whether or not &#39;proposal&#39; uses local Hessian.
void scanInputFile()
This is the method that parses the input file.
#define UQ_ML_SAMPLING_L_FILTERED_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV
std::string m_option_initialProposalCovMatrix_dataInputFileName
std::string m_rawChainDataOutputFileName
Name of output file for raw chain.
double m_maxRejectionRate
maximum allowed attempted rejection rate at current level.
#define UQ_ML_SAMPLING_L_MIN_REJECTION_RATE_ODV
This class provides options for each level of the Multilevel sequence generator if no input file is a...
bool m_stopAtEnd
Stop at end of such level.
#define UQ_ML_SAMPLING_L_COV_REJECTION_RATE_ODV
#define UQ_ML_SAMPLING_L_FILTERED_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV
#define UQ_ML_SAMPLING_L_DR_MAX_NUM_EXTRA_STAGES_ODV
std::string m_rawChainDataInputFileType
Type of input file for raw chain.
const BaseEnvironment & env() const
Access to the environment.
std::string m_option_am_adaptedMatrices_dataOutputAllowedSet
std::string m_checkpointOutputFileName
Name of checkpoint output file.
#define UQ_ML_SAMPLING_L_RAW_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV
#define UQ_ML_SAMPLING_L_AM_KEEP_INITIAL_MATRIX_ODV
#define UQ_ML_SAMPLING_L_MAX_EFFECTIVE_SIZE_RATIO_ODV
#define UQ_ML_SAMPLING_L_LOAD_BALANCE_ALGORITHM_ID_ODV
#define UQ_ML_SAMPLING_L_RAW_CHAIN_DATA_OUTPUT_PERIOD_ODV
bool m_displayCandidates
Display candidates generated in the core MH algorithm.
std::set< unsigned int > m_dataOutputAllowedSet
subEnvs that will write to generic output file.
std::string m_help
If non-empty string, print options and values to output file.
std::vector< double > m_drScalesForExtraStages
&#39;dr&#39; list of scales for proposal covariance matrices from 2nd stage on.
#define UQ_ML_SAMPLING_L_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_NAME_ODV
std::string m_option_rawChain_dataOutputFileType
Option name for MLSamplingLevelOptions::m_rawChainDataOutputFileType. Option name is m_prefix + &quot;ml_r...
std::string m_filteredChainDataOutputFileType
Type of output file for filtered chain.
#define UQ_ML_SAMPLING_L_RAW_CHAIN_DISPLAY_PERIOD_ODV
#define UQ_ML_SAMPLING_L_SCALE_COV_MATRIX_ODV
std::string m_filteredChainDataOutputFileName
Name of output file for filtered chain.
void registerOption(std::string name, T defaultValue, std::string description)
Call this to register an option with the parser.
#define UQ_ML_SAMPLING_L_FILTERED_CHAIN_GENERATE_ODV
#define UQ_ML_SAMPLING_L_RAW_CHAIN_GENERATE_EXTRA_ODV
std::string m_str1
subEnvs that will write to generic output file.
#define UQ_ML_SAMPLING_L_MIN_EFFECTIVE_SIZE_RATIO_ODV
#define UQ_ML_SAMPLING_L_AM_ADAPTED_MATRICES_DATA_OUTPUT_PERIOD_ODV
#define UQ_ML_SAMPLING_L_MIN_ACCEPTABLE_ETA_ODV
void print(std::ostream &os) const
std::string m_rawChainDataOutputFileType
Type of output file for raw chain.
#define UQ_ML_SAMPLING_L_TK_USE_NEWTON_COMPONENT_ODV
std::string m_initialProposalCovMatrixDataInputFileName
Name of input file for initial proposal covariance matrix.
unsigned int m_rawChainDataOutputPeriod
Period of message display during raw chain generation.
void scanOptionsValues(const MLSamplingLevelOptions *defaultOptions)
BoostInputOptionsParser * m_parser
unsigned int m_rawChainDisplayPeriod
Period of message display during raw chain generation.
#define UQ_ML_SAMPLING_L_FILTERED_CHAIN_DISCARDED_PORTION_ODV
std::set< unsigned int > m_filteredChainDataOutputAllowedSet
subEnvs that will write to output file for filtered chain.
unsigned int m_amAdaptInterval
&#39;am&#39; adaptation interval.
unsigned int m_amAdaptedMatricesDataOutputPeriod
Period for outputing &#39;am&#39; adapted matrices.
#define UQ_ML_SAMPLING_L_DR_DURING_AM_NON_ADAPTIVE_INT_ODV
unsigned int m_loadBalanceAlgorithmId
Perform load balancing with chosen algorithm (0 = no balancing).
#define UQ_ML_SAMPLING_L_AM_ETA_ODV
std::string m_amAdaptedMatricesDataOutputFileName
Name of output file for &#39;am&#39; adapted matrices.
std::string m_rawChainDataInputFileName
Name of input file for raw chain.
bool m_amAdaptedMatricesDataOutputAllowAll
Whether or not subEnvs will write to output file for &#39;am&#39; adapted matrices.
bool m_rawChainDataOutputAllowAll
Whether or not subEnvs will write to output file for raw chain.
#define UQ_ML_SAMPLING_L_RAW_CHAIN_DATA_INPUT_FILE_TYPE_ODV
std::string m_algorithm
Which algorithm to use for sampling.
#define UQ_ML_SAMPLING_L_TOTALLY_MUTE_ODV
std::string m_option_initialPositionUsePreviousLevelLikelihood
std::string m_initialPositionDataInputFileName
Name of input file for initial position.
bool m_filteredChainDataOutputAllowAll
Whether or not subEnvs will write to output file for filtered chain.
std::vector< double > m_initialValuesOfDisabledParameters
#define UQ_ML_SAMPLING_L_AM_INIT_NON_ADAPT_INT_ODV
MLSamplingLevelOptions(const BaseEnvironment &env, const char *prefix)
Constructor: reads options from the input file.
bool m_amKeepInitialMatrix
Whether or not &#39;am&#39; will keep initial (given) matrix.
#define UQ_ML_SAMPLING_L_FILTERED_CHAIN_LAG_ODV
#define UQ_ML_SAMPLING_L_INITIAL_POSITION_DATA_INPUT_FILE_NAME_ODV
unsigned int m_amInitialNonAdaptInterval
&#39;am&#39; initial non adaptation interval
#define UQ_ML_SAMPLING_L_ALGORITHM
#define UQ_ML_SAMPLING_L_STOP_AT_END_ODV

Generated on Thu Dec 15 2016 13:23:11 for queso-0.56.1 by  doxygen 1.8.5