25 #include <queso/Environment.h>
27 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
28 #include <boost/program_options.hpp>
30 #include <queso/getpot.h>
31 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
33 #include <queso/MetropolisHastingsSGOptions.h>
34 #include <queso/Miscellaneous.h>
44 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
53 m_dataOutputAllowAll (UQ_MH_SG_DATA_OUTPUT_ALLOW_ALL_ODV),
55 m_totallyMute (UQ_MH_SG_TOTALLY_MUTE_ODV),
56 m_initialPositionDataInputFileName (UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_NAME_ODV),
57 m_initialPositionDataInputFileType (UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_TYPE_ODV),
58 m_initialProposalCovMatrixDataInputFileName(UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_NAME_ODV),
59 m_initialProposalCovMatrixDataInputFileType(UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_TYPE_ODV),
61 m_rawChainDataInputFileName (UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_NAME_ODV),
62 m_rawChainDataInputFileType (UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_TYPE_ODV),
63 m_rawChainSize (UQ_MH_SG_RAW_CHAIN_SIZE_ODV),
64 m_rawChainGenerateExtra (UQ_MH_SG_RAW_CHAIN_GENERATE_EXTRA_ODV),
65 m_rawChainDisplayPeriod (UQ_MH_SG_RAW_CHAIN_DISPLAY_PERIOD_ODV),
66 m_rawChainMeasureRunTimes (UQ_MH_SG_RAW_CHAIN_MEASURE_RUN_TIMES_ODV),
67 m_rawChainDataOutputPeriod (UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_PERIOD_ODV),
68 m_rawChainDataOutputFileName (UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_NAME_ODV),
69 m_rawChainDataOutputFileType (UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV),
70 m_rawChainDataOutputAllowAll (UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV),
72 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
73 m_rawChainComputeStats (UQ_MH_SG_RAW_CHAIN_COMPUTE_STATS_ODV),
75 m_filteredChainGenerate (UQ_MH_SG_FILTERED_CHAIN_GENERATE_ODV),
76 m_filteredChainDiscardedPortion (UQ_MH_SG_FILTERED_CHAIN_DISCARDED_PORTION_ODV),
77 m_filteredChainLag (UQ_MH_SG_FILTERED_CHAIN_LAG_ODV),
78 m_filteredChainDataOutputFileName (UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_NAME_ODV),
79 m_filteredChainDataOutputFileType (UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV),
80 m_filteredChainDataOutputAllowAll (UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV),
82 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
83 m_filteredChainComputeStats (UQ_MH_SG_FILTERED_CHAIN_COMPUTE_STATS_ODV),
85 m_displayCandidates (UQ_MH_SG_DISPLAY_CANDIDATES_ODV),
86 m_putOutOfBoundsInChain (UQ_MH_SG_PUT_OUT_OF_BOUNDS_IN_CHAIN_ODV),
87 m_tkUseLocalHessian (UQ_MH_SG_TK_USE_LOCAL_HESSIAN_ODV),
88 m_tkUseNewtonComponent (UQ_MH_SG_TK_USE_NEWTON_COMPONENT_ODV),
89 m_drMaxNumExtraStages (UQ_MH_SG_DR_MAX_NUM_EXTRA_STAGES_ODV),
90 m_drScalesForExtraStages (0),
91 m_drDuringAmNonAdaptiveInt (UQ_MH_SG_DR_DURING_AM_NON_ADAPTIVE_INT_ODV),
92 m_amKeepInitialMatrix (UQ_MH_SG_AM_KEEP_INITIAL_MATRIX_ODV),
93 m_amInitialNonAdaptInterval (UQ_MH_SG_AM_INIT_NON_ADAPT_INT_ODV),
94 m_amAdaptInterval (UQ_MH_SG_AM_ADAPT_INTERVAL_ODV),
95 m_amAdaptedMatricesDataOutputPeriod (UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_PERIOD_ODV),
96 m_amAdaptedMatricesDataOutputFileName (UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_NAME_ODV),
97 m_amAdaptedMatricesDataOutputFileType (UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_TYPE_ODV),
98 m_amAdaptedMatricesDataOutputAllowAll (UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOW_ALL_ODV),
100 m_amEta (UQ_MH_SG_AM_ETA_ODV),
101 m_amEpsilon (UQ_MH_SG_AM_EPSILON_ODV),
102 m_enableBrooksGelmanConvMonitor (UQ_MH_SG_ENABLE_BROOKS_GELMAN_CONV_MONITOR),
103 m_BrooksGelmanLag (UQ_MH_SG_BROOKS_GELMAN_LAG),
104 m_outputLogLikelihood (UQ_MH_SG_OUTPUT_LOG_LIKELIHOOD),
105 m_outputLogTarget (UQ_MH_SG_OUTPUT_LOG_TARGET),
106 m_doLogitTransform (UQ_MH_SG_DO_LOGIT_TRANSFORM),
107 m_algorithm (UQ_MH_SG_ALGORITHM),
109 m_updateInterval (UQ_MH_SG_UPDATE_INTERVAL),
110 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
111 m_alternativeRawSsOptionsValues (),
112 m_alternativeFilteredSsOptionsValues (),
115 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
118 m_option_help (m_prefix +
"help" ),
119 m_option_dataOutputFileName (m_prefix +
"dataOutputFileName" ),
120 m_option_dataOutputAllowAll (m_prefix +
"dataOutputAllowAll" ),
121 m_option_dataOutputAllowedSet (m_prefix +
"dataOutputAllowedSet" ),
122 m_option_totallyMute (m_prefix +
"totallyMute" ),
123 m_option_initialPosition_dataInputFileName (m_prefix +
"initialPosition_dataInputFileName" ),
124 m_option_initialPosition_dataInputFileType (m_prefix +
"initialPosition_dataInputFileType" ),
125 m_option_initialProposalCovMatrix_dataInputFileName(m_prefix +
"initialProposalCovMatrix_dataInputFileName"),
126 m_option_initialProposalCovMatrix_dataInputFileType(m_prefix +
"initialProposalCovMatrix_dataInputFileType"),
127 m_option_listOfDisabledParameters (m_prefix +
"listOfDisabledParameters" ),
128 m_option_rawChain_dataInputFileName (m_prefix +
"rawChain_dataInputFileName" ),
129 m_option_rawChain_dataInputFileType (m_prefix +
"rawChain_dataInputFileType" ),
130 m_option_rawChain_size (m_prefix +
"rawChain_size" ),
131 m_option_rawChain_generateExtra (m_prefix +
"rawChain_generateExtra" ),
132 m_option_rawChain_displayPeriod (m_prefix +
"rawChain_displayPeriod" ),
133 m_option_rawChain_measureRunTimes (m_prefix +
"rawChain_measureRunTimes" ),
134 m_option_rawChain_dataOutputPeriod (m_prefix +
"rawChain_dataOutputPeriod" ),
135 m_option_rawChain_dataOutputFileName (m_prefix +
"rawChain_dataOutputFileName" ),
136 m_option_rawChain_dataOutputFileType (m_prefix +
"rawChain_dataOutputFileType" ),
137 m_option_rawChain_dataOutputAllowAll (m_prefix +
"rawChain_dataOutputAllowAll" ),
138 m_option_rawChain_dataOutputAllowedSet (m_prefix +
"rawChain_dataOutputAllowedSet" ),
139 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
140 m_option_rawChain_computeStats (m_prefix +
"rawChain_computeStats" ),
142 m_option_filteredChain_generate (m_prefix +
"filteredChain_generate" ),
143 m_option_filteredChain_discardedPortion (m_prefix +
"filteredChain_discardedPortion" ),
144 m_option_filteredChain_lag (m_prefix +
"filteredChain_lag" ),
145 m_option_filteredChain_dataOutputFileName (m_prefix +
"filteredChain_dataOutputFileName" ),
146 m_option_filteredChain_dataOutputFileType (m_prefix +
"filteredChain_dataOutputFileType" ),
147 m_option_filteredChain_dataOutputAllowAll (m_prefix +
"filteredChain_dataOutputAllowAll" ),
148 m_option_filteredChain_dataOutputAllowedSet (m_prefix +
"filteredChain_dataOutputAllowedSet" ),
149 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
150 m_option_filteredChain_computeStats (m_prefix +
"filteredChain_computeStats" ),
152 m_option_displayCandidates (m_prefix +
"displayCandidates" ),
153 m_option_putOutOfBoundsInChain (m_prefix +
"putOutOfBoundsInChain" ),
154 m_option_tk_useLocalHessian (m_prefix +
"tk_useLocalHessian" ),
155 m_option_tk_useNewtonComponent (m_prefix +
"tk_useNewtonComponent" ),
156 m_option_dr_maxNumExtraStages (m_prefix +
"dr_maxNumExtraStages" ),
157 m_option_dr_listOfScalesForExtraStages (m_prefix +
"dr_listOfScalesForExtraStages" ),
158 m_option_dr_duringAmNonAdaptiveInt (m_prefix +
"dr_duringAmNonAdaptiveInt" ),
159 m_option_am_keepInitialMatrix (m_prefix +
"am_keepInitialMatrix" ),
160 m_option_am_initialNonAdaptInterval (m_prefix +
"am_initialNonAdaptInterval" ),
161 m_option_am_adaptInterval (m_prefix +
"am_adaptInterval" ),
162 m_option_am_adaptedMatrices_dataOutputPeriod (m_prefix +
"am_adaptedMatrices_dataOutputPeriod" ),
163 m_option_am_adaptedMatrices_dataOutputFileName (m_prefix +
"am_adaptedMatrices_dataOutputFileName" ),
164 m_option_am_adaptedMatrices_dataOutputFileType (m_prefix +
"am_adaptedMatrices_dataOutputFileType" ),
165 m_option_am_adaptedMatrices_dataOutputAllowAll (m_prefix +
"am_adaptedMatrices_dataOutputAllowAll" ),
166 m_option_am_adaptedMatrices_dataOutputAllowedSet (m_prefix +
"am_adaptedMatrices_dataOutputAllowedSet" ),
167 m_option_am_eta (m_prefix +
"am_eta" ),
168 m_option_am_epsilon (m_prefix +
"am_epsilon" ),
169 m_option_enableBrooksGelmanConvMonitor (m_prefix +
"enableBrooksGelmanConvMonitor" ),
170 m_option_BrooksGelmanLag (m_prefix +
"BrooksGelmanLag" ),
171 m_option_outputLogLikelihood (m_prefix +
"outputLogLikelihood" ),
172 m_option_outputLogTarget (m_prefix +
"outputLogTarget" ),
173 m_option_doLogitTransform (m_prefix +
"doLogitTransform" ),
174 m_option_algorithm (m_prefix +
"algorithm" ),
175 m_option_tk (m_prefix +
"tk" ),
176 m_option_updateInterval (m_prefix +
"updateInterval" )
178 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
179 if (alternativeRawSsOptionsValues ) m_alternativeRawSsOptionsValues = *alternativeRawSsOptionsValues;
180 if (alternativeFilteredSsOptionsValues) m_alternativeFilteredSsOptionsValues = *alternativeFilteredSsOptionsValues;
185 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
189 const BaseEnvironment * env,
193 m_prefix ((std::string)(prefix) +
"mh_"),
196 m_dataOutputAllowAll (UQ_MH_SG_DATA_OUTPUT_ALLOW_ALL_ODV),
198 m_totallyMute (UQ_MH_SG_TOTALLY_MUTE_ODV),
199 m_initialPositionDataInputFileName (UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_NAME_ODV),
200 m_initialPositionDataInputFileType (UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_TYPE_ODV),
201 m_initialProposalCovMatrixDataInputFileName(UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_NAME_ODV),
202 m_initialProposalCovMatrixDataInputFileType(UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_TYPE_ODV),
204 m_rawChainDataInputFileName (UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_NAME_ODV),
205 m_rawChainDataInputFileType (UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_TYPE_ODV),
206 m_rawChainSize (UQ_MH_SG_RAW_CHAIN_SIZE_ODV),
207 m_rawChainGenerateExtra (UQ_MH_SG_RAW_CHAIN_GENERATE_EXTRA_ODV),
208 m_rawChainDisplayPeriod (UQ_MH_SG_RAW_CHAIN_DISPLAY_PERIOD_ODV),
209 m_rawChainMeasureRunTimes (UQ_MH_SG_RAW_CHAIN_MEASURE_RUN_TIMES_ODV),
210 m_rawChainDataOutputPeriod (UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_PERIOD_ODV),
211 m_rawChainDataOutputFileName (UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_NAME_ODV),
212 m_rawChainDataOutputFileType (UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV),
213 m_rawChainDataOutputAllowAll (UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV),
215 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
216 m_rawChainComputeStats (UQ_MH_SG_RAW_CHAIN_COMPUTE_STATS_ODV),
218 m_filteredChainGenerate (UQ_MH_SG_FILTERED_CHAIN_GENERATE_ODV),
219 m_filteredChainDiscardedPortion (UQ_MH_SG_FILTERED_CHAIN_DISCARDED_PORTION_ODV),
220 m_filteredChainLag (UQ_MH_SG_FILTERED_CHAIN_LAG_ODV),
221 m_filteredChainDataOutputFileName (UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_NAME_ODV),
222 m_filteredChainDataOutputFileType (UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV),
223 m_filteredChainDataOutputAllowAll (UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV),
225 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
226 m_filteredChainComputeStats (UQ_MH_SG_FILTERED_CHAIN_COMPUTE_STATS_ODV),
228 m_displayCandidates (UQ_MH_SG_DISPLAY_CANDIDATES_ODV),
229 m_putOutOfBoundsInChain (UQ_MH_SG_PUT_OUT_OF_BOUNDS_IN_CHAIN_ODV),
230 m_tkUseLocalHessian (UQ_MH_SG_TK_USE_LOCAL_HESSIAN_ODV),
231 m_tkUseNewtonComponent (UQ_MH_SG_TK_USE_NEWTON_COMPONENT_ODV),
232 m_drMaxNumExtraStages (UQ_MH_SG_DR_MAX_NUM_EXTRA_STAGES_ODV),
233 m_drScalesForExtraStages (0),
234 m_drDuringAmNonAdaptiveInt (UQ_MH_SG_DR_DURING_AM_NON_ADAPTIVE_INT_ODV),
235 m_amKeepInitialMatrix (UQ_MH_SG_AM_KEEP_INITIAL_MATRIX_ODV),
236 m_amInitialNonAdaptInterval (UQ_MH_SG_AM_INIT_NON_ADAPT_INT_ODV),
237 m_amAdaptInterval (UQ_MH_SG_AM_ADAPT_INTERVAL_ODV),
238 m_amAdaptedMatricesDataOutputPeriod (UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_PERIOD_ODV),
239 m_amAdaptedMatricesDataOutputFileName (UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_NAME_ODV),
240 m_amAdaptedMatricesDataOutputFileType (UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_TYPE_ODV),
241 m_amAdaptedMatricesDataOutputAllowAll (UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOW_ALL_ODV),
243 m_amEta (UQ_MH_SG_AM_ETA_ODV),
244 m_amEpsilon (UQ_MH_SG_AM_EPSILON_ODV),
245 m_enableBrooksGelmanConvMonitor (UQ_MH_SG_ENABLE_BROOKS_GELMAN_CONV_MONITOR),
246 m_BrooksGelmanLag (UQ_MH_SG_BROOKS_GELMAN_LAG),
247 m_outputLogLikelihood (UQ_MH_SG_OUTPUT_LOG_LIKELIHOOD),
248 m_outputLogTarget (UQ_MH_SG_OUTPUT_LOG_TARGET),
249 m_doLogitTransform (UQ_MH_SG_DO_LOGIT_TRANSFORM),
250 m_algorithm (UQ_MH_SG_ALGORITHM),
252 m_updateInterval (UQ_MH_SG_UPDATE_INTERVAL),
253 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
254 m_alternativeRawSsOptionsValues (),
255 m_alternativeFilteredSsOptionsValues (),
258 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
259 m_parser(new BoostInputOptionsParser(env->optionsInputFileName())),
261 m_option_help (m_prefix +
"help" ),
262 m_option_dataOutputFileName (m_prefix +
"dataOutputFileName" ),
263 m_option_dataOutputAllowAll (m_prefix +
"dataOutputAllowAll" ),
264 m_option_dataOutputAllowedSet (m_prefix +
"dataOutputAllowedSet" ),
265 m_option_totallyMute (m_prefix +
"totallyMute" ),
266 m_option_initialPosition_dataInputFileName (m_prefix +
"initialPosition_dataInputFileName" ),
267 m_option_initialPosition_dataInputFileType (m_prefix +
"initialPosition_dataInputFileType" ),
268 m_option_initialProposalCovMatrix_dataInputFileName(m_prefix +
"initialProposalCovMatrix_dataInputFileName"),
269 m_option_initialProposalCovMatrix_dataInputFileType(m_prefix +
"initialProposalCovMatrix_dataInputFileType"),
270 m_option_listOfDisabledParameters (m_prefix +
"listOfDisabledParameters" ),
271 m_option_rawChain_dataInputFileName (m_prefix +
"rawChain_dataInputFileName" ),
272 m_option_rawChain_dataInputFileType (m_prefix +
"rawChain_dataInputFileType" ),
273 m_option_rawChain_size (m_prefix +
"rawChain_size" ),
274 m_option_rawChain_generateExtra (m_prefix +
"rawChain_generateExtra" ),
275 m_option_rawChain_displayPeriod (m_prefix +
"rawChain_displayPeriod" ),
276 m_option_rawChain_measureRunTimes (m_prefix +
"rawChain_measureRunTimes" ),
277 m_option_rawChain_dataOutputPeriod (m_prefix +
"rawChain_dataOutputPeriod" ),
278 m_option_rawChain_dataOutputFileName (m_prefix +
"rawChain_dataOutputFileName" ),
279 m_option_rawChain_dataOutputFileType (m_prefix +
"rawChain_dataOutputFileType" ),
280 m_option_rawChain_dataOutputAllowAll (m_prefix +
"rawChain_dataOutputAllowAll" ),
281 m_option_rawChain_dataOutputAllowedSet (m_prefix +
"rawChain_dataOutputAllowedSet" ),
282 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
283 m_option_rawChain_computeStats (m_prefix +
"rawChain_computeStats" ),
285 m_option_filteredChain_generate (m_prefix +
"filteredChain_generate" ),
286 m_option_filteredChain_discardedPortion (m_prefix +
"filteredChain_discardedPortion" ),
287 m_option_filteredChain_lag (m_prefix +
"filteredChain_lag" ),
288 m_option_filteredChain_dataOutputFileName (m_prefix +
"filteredChain_dataOutputFileName" ),
289 m_option_filteredChain_dataOutputFileType (m_prefix +
"filteredChain_dataOutputFileType" ),
290 m_option_filteredChain_dataOutputAllowAll (m_prefix +
"filteredChain_dataOutputAllowAll" ),
291 m_option_filteredChain_dataOutputAllowedSet (m_prefix +
"filteredChain_dataOutputAllowedSet" ),
292 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
293 m_option_filteredChain_computeStats (m_prefix +
"filteredChain_computeStats" ),
295 m_option_displayCandidates (m_prefix +
"displayCandidates" ),
296 m_option_putOutOfBoundsInChain (m_prefix +
"putOutOfBoundsInChain" ),
297 m_option_tk_useLocalHessian (m_prefix +
"tk_useLocalHessian" ),
298 m_option_tk_useNewtonComponent (m_prefix +
"tk_useNewtonComponent" ),
299 m_option_dr_maxNumExtraStages (m_prefix +
"dr_maxNumExtraStages" ),
300 m_option_dr_listOfScalesForExtraStages (m_prefix +
"dr_listOfScalesForExtraStages" ),
301 m_option_dr_duringAmNonAdaptiveInt (m_prefix +
"dr_duringAmNonAdaptiveInt" ),
302 m_option_am_keepInitialMatrix (m_prefix +
"am_keepInitialMatrix" ),
303 m_option_am_initialNonAdaptInterval (m_prefix +
"am_initialNonAdaptInterval" ),
304 m_option_am_adaptInterval (m_prefix +
"am_adaptInterval" ),
305 m_option_am_adaptedMatrices_dataOutputPeriod (m_prefix +
"am_adaptedMatrices_dataOutputPeriod" ),
306 m_option_am_adaptedMatrices_dataOutputFileName (m_prefix +
"am_adaptedMatrices_dataOutputFileName" ),
307 m_option_am_adaptedMatrices_dataOutputFileType (m_prefix +
"am_adaptedMatrices_dataOutputFileType" ),
308 m_option_am_adaptedMatrices_dataOutputAllowAll (m_prefix +
"am_adaptedMatrices_dataOutputAllowAll" ),
309 m_option_am_adaptedMatrices_dataOutputAllowedSet (m_prefix +
"am_adaptedMatrices_dataOutputAllowedSet" ),
310 m_option_am_eta (m_prefix +
"am_eta" ),
311 m_option_am_epsilon (m_prefix +
"am_epsilon" ),
312 m_option_enableBrooksGelmanConvMonitor (m_prefix +
"enableBrooksGelmanConvMonitor" ),
313 m_option_BrooksGelmanLag (m_prefix +
"BrooksGelmanLag" ),
314 m_option_outputLogLikelihood (m_prefix +
"outputLogLikelihood" ),
315 m_option_outputLogTarget (m_prefix +
"outputLogTarget" ),
316 m_option_doLogitTransform (m_prefix +
"doLogitTransform" ),
317 m_option_algorithm (m_prefix +
"algorithm" ),
318 m_option_tk (m_prefix +
"tk" ),
319 m_option_updateInterval (m_prefix +
"updateInterval" )
321 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
322 if (alternativeRawSsOptionsValues ) m_alternativeRawSsOptionsValues = *alternativeRawSsOptionsValues;
323 if (alternativeFilteredSsOptionsValues) m_alternativeFilteredSsOptionsValues = *alternativeFilteredSsOptionsValues;
326 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
327 m_parser->registerOption<std::string >(m_option_help, UQ_MH_SG_HELP,
"produce help msg for Bayesian Metropolis-Hastings" );
328 m_parser->registerOption<std::string >(m_option_dataOutputFileName, UQ_MH_SG_DATA_OUTPUT_FILE_NAME_ODV ,
"name of generic output file" );
329 m_parser->registerOption<
bool >(m_option_dataOutputAllowAll, UQ_MH_SG_DATA_OUTPUT_ALLOW_ALL_ODV ,
"allow all subEnvs write to a generic output file" );
330 m_parser->registerOption<std::string >(m_option_dataOutputAllowedSet, UQ_MH_SG_DATA_OUTPUT_ALLOWED_SET_ODV ,
"subEnvs that will write to generic output file" );
331 m_parser->registerOption<
bool >(m_option_totallyMute, UQ_MH_SG_TOTALLY_MUTE_ODV ,
"totally mute (no printout msg)" );
332 m_parser->registerOption<std::string >(m_option_initialPosition_dataInputFileName, UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_NAME_ODV ,
"name of input file for raw chain " );
333 m_parser->registerOption<std::string >(m_option_initialPosition_dataInputFileType, UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_TYPE_ODV ,
"type of input file for raw chain " );
334 m_parser->registerOption<std::string >(m_option_initialProposalCovMatrix_dataInputFileName, UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_NAME_ODV,
"name of input file for raw chain " );
335 m_parser->registerOption<std::string >(m_option_initialProposalCovMatrix_dataInputFileType, UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_TYPE_ODV,
"type of input file for raw chain " );
336 m_parser->registerOption<std::string >(m_option_listOfDisabledParameters, UQ_MH_SG_LIST_OF_DISABLED_PARAMETERS_ODV ,
"list of disabled parameters" );
337 m_parser->registerOption<std::string >(m_option_rawChain_dataInputFileName, UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_NAME_ODV ,
"name of input file for raw chain " );
338 m_parser->registerOption<std::string >(m_option_rawChain_dataInputFileType, UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_TYPE_ODV ,
"type of input file for raw chain " );
339 m_parser->registerOption<
unsigned int>(m_option_rawChain_size, UQ_MH_SG_RAW_CHAIN_SIZE_ODV ,
"size of raw chain" );
340 m_parser->registerOption<
bool >(m_option_rawChain_generateExtra, UQ_MH_SG_RAW_CHAIN_GENERATE_EXTRA_ODV ,
"generate extra information about raw chain" );
341 m_parser->registerOption<
unsigned int>(m_option_rawChain_displayPeriod, UQ_MH_SG_RAW_CHAIN_DISPLAY_PERIOD_ODV ,
"period of msg display during raw chain generation" );
342 m_parser->registerOption<
bool >(m_option_rawChain_measureRunTimes, UQ_MH_SG_RAW_CHAIN_MEASURE_RUN_TIMES_ODV ,
"measure run times" );
343 m_parser->registerOption<
unsigned int>(m_option_rawChain_dataOutputPeriod, UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_PERIOD_ODV ,
"period of msg display during raw chain generation" );
344 m_parser->registerOption<std::string >(m_option_rawChain_dataOutputFileName, UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_NAME_ODV ,
"name of output file for raw chain " );
345 m_parser->registerOption<std::string >(m_option_rawChain_dataOutputFileType, UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV ,
"type of output file for raw chain " );
346 m_parser->registerOption<
bool >(m_option_rawChain_dataOutputAllowAll, UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV ,
"allow all subEnvs to write raw chain to an output file" );
347 m_parser->registerOption<std::string >(m_option_rawChain_dataOutputAllowedSet, UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_ALLOWED_SET_ODV ,
"subEnvs that will write raw chain to output file" );
348 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
349 m_parser->registerOption<
bool >(m_option_rawChain_computeStats, UQ_MH_SG_RAW_CHAIN_COMPUTE_STATS_ODV ,
"compute statistics on raw chain" );
351 m_parser->registerOption<
bool >(m_option_filteredChain_generate, UQ_MH_SG_FILTERED_CHAIN_GENERATE_ODV ,
"generate filtered chain" );
352 m_parser->registerOption<
double >(m_option_filteredChain_discardedPortion, UQ_MH_SG_FILTERED_CHAIN_DISCARDED_PORTION_ODV ,
"initial discarded portion for chain filtering" );
353 m_parser->registerOption<
unsigned int>(m_option_filteredChain_lag, UQ_MH_SG_FILTERED_CHAIN_LAG_ODV ,
"spacing for chain filtering" );
354 m_parser->registerOption<std::string >(m_option_filteredChain_dataOutputFileName, UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_NAME_ODV ,
"name of output file for filtered chain" );
355 m_parser->registerOption<std::string >(m_option_filteredChain_dataOutputFileType, UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV ,
"type of output file for filtered chain" );
356 m_parser->registerOption<
bool >(m_option_filteredChain_dataOutputAllowAll, UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV ,
"allow all subEnvs to write filt chain to an output file" );
357 m_parser->registerOption<std::string >(m_option_filteredChain_dataOutputAllowedSet, UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_ALLOWED_SET_ODV ,
"subEnvs that will write filt chain to output file" );
358 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
359 m_parser->registerOption<
bool >(m_option_filteredChain_computeStats, UQ_MH_SG_FILTERED_CHAIN_COMPUTE_STATS_ODV ,
"compute statistics on filtered chain" );
361 m_parser->registerOption<
bool >(m_option_displayCandidates, UQ_MH_SG_DISPLAY_CANDIDATES_ODV ,
"display candidates in the core MH algorithm" );
362 m_parser->registerOption<
bool >(m_option_putOutOfBoundsInChain, UQ_MH_SG_PUT_OUT_OF_BOUNDS_IN_CHAIN_ODV ,
"put 'out of bound' candidates in chain as well" );
363 m_parser->registerOption<
bool >(m_option_tk_useLocalHessian, UQ_MH_SG_TK_USE_LOCAL_HESSIAN_ODV ,
"'proposal' use local Hessian" );
364 m_parser->registerOption<
bool >(m_option_tk_useNewtonComponent, UQ_MH_SG_TK_USE_NEWTON_COMPONENT_ODV ,
"'proposal' use Newton component" );
365 m_parser->registerOption<
unsigned int>(m_option_dr_maxNumExtraStages, UQ_MH_SG_DR_MAX_NUM_EXTRA_STAGES_ODV ,
"'dr' maximum number of extra stages" );
366 m_parser->registerOption<std::string >(m_option_dr_listOfScalesForExtraStages, UQ_MH_SG_DR_LIST_OF_SCALES_FOR_EXTRA_STAGES_ODV ,
"'dr' scales for prop cov matrices from 2nd stage on" );
367 m_parser->registerOption<
bool >(m_option_dr_duringAmNonAdaptiveInt, UQ_MH_SG_DR_DURING_AM_NON_ADAPTIVE_INT_ODV ,
"'dr' used during 'am' non adaptive interval" );
368 m_parser->registerOption<
bool >(m_option_am_keepInitialMatrix, UQ_MH_SG_AM_KEEP_INITIAL_MATRIX_ODV ,
"'am' keep initial (given) matrix" );
369 m_parser->registerOption<
unsigned int>(m_option_am_initialNonAdaptInterval, UQ_MH_SG_AM_INIT_NON_ADAPT_INT_ODV ,
"'am' initial non adaptation interval" );
370 m_parser->registerOption<
unsigned int>(m_option_am_adaptInterval, UQ_MH_SG_AM_ADAPT_INTERVAL_ODV ,
"'am' adaptation interval" );
371 m_parser->registerOption<
unsigned int>(m_option_am_adaptedMatrices_dataOutputPeriod, UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_PERIOD_ODV ,
"period for outputting 'am' adapted matrices" );
372 m_parser->registerOption<std::string >(m_option_am_adaptedMatrices_dataOutputFileName, UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_NAME_ODV ,
"name of output file for 'am' adapted matrices" );
373 m_parser->registerOption<std::string >(m_option_am_adaptedMatrices_dataOutputFileType, UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_TYPE_ODV ,
"type of output file for 'am' adapted matrices" );
374 m_parser->registerOption<
bool >(m_option_am_adaptedMatrices_dataOutputAllowAll, UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOW_ALL_ODV ,
"type of output file for 'am' adapted matrices" );
375 m_parser->registerOption<std::string >(m_option_am_adaptedMatrices_dataOutputAllowedSet, UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOWED_SET_ODV ,
"type of output file for 'am' adapted matrices" );
376 m_parser->registerOption<
double >(m_option_am_eta, UQ_MH_SG_AM_ETA_ODV ,
"'am' eta" );
377 m_parser->registerOption<
double >(m_option_am_epsilon, UQ_MH_SG_AM_EPSILON_ODV ,
"'am' epsilon" );
378 m_parser->registerOption<
unsigned int>(m_option_enableBrooksGelmanConvMonitor, UQ_MH_SG_ENABLE_BROOKS_GELMAN_CONV_MONITOR ,
"assess convergence using Brooks-Gelman metric" );
379 m_parser->registerOption<
unsigned int>(m_option_BrooksGelmanLag, UQ_MH_SG_BROOKS_GELMAN_LAG ,
"number of chain positions before starting to compute metric");
380 m_parser->registerOption<
bool >(m_option_outputLogLikelihood, UQ_MH_SG_OUTPUT_LOG_LIKELIHOOD ,
"flag to toggle output of log likelihood values" );
381 m_parser->registerOption<
bool >(m_option_outputLogTarget, UQ_MH_SG_OUTPUT_LOG_TARGET ,
"flag to toggle output of log target values" );
382 m_parser->registerOption<
bool >(m_option_doLogitTransform, UQ_MH_SG_DO_LOGIT_TRANSFORM ,
"flag to toggle logit transform for bounded domains" );
383 m_parser->registerOption<std::string >(m_option_algorithm, UQ_MH_SG_ALGORITHM ,
"which MCMC algorithm to use" );
384 m_parser->registerOption<std::string >(m_option_tk, UQ_MH_SG_TK ,
"which MCMC transition kernel to use" );
385 m_parser->registerOption<
unsigned int>(m_option_updateInterval, UQ_MH_SG_UPDATE_INTERVAL ,
"how often to call updateTK method" );
387 m_parser->scanInputFile();
389 m_parser->getOption<std::string >(m_option_help,
m_help);
391 m_parser->getOption<
bool >(m_option_dataOutputAllowAll, m_dataOutputAllowAll);
392 m_parser->getOption<std::set<unsigned int> >(m_option_dataOutputAllowedSet, m_dataOutputAllowedSet);
393 m_parser->getOption<
bool >(m_option_totallyMute, m_totallyMute);
394 m_parser->getOption<std::string >(m_option_initialPosition_dataInputFileName, m_initialPositionDataInputFileName);
395 m_parser->getOption<std::string >(m_option_initialPosition_dataInputFileType, m_initialPositionDataInputFileType);
396 m_parser->getOption<std::string >(m_option_initialProposalCovMatrix_dataInputFileName, m_initialProposalCovMatrixDataInputFileName);
397 m_parser->getOption<std::string >(m_option_initialProposalCovMatrix_dataInputFileType, m_initialProposalCovMatrixDataInputFileType);
398 m_parser->getOption<std::set<unsigned int> >(m_option_listOfDisabledParameters, m_parameterDisabledSet);
399 m_parser->getOption<std::string >(m_option_rawChain_dataInputFileName, m_rawChainDataInputFileName);
400 m_parser->getOption<std::string >(m_option_rawChain_dataInputFileType, m_rawChainDataInputFileType);
401 m_parser->getOption<
unsigned int>(m_option_rawChain_size, m_rawChainSize);
402 m_parser->getOption<
bool >(m_option_rawChain_generateExtra, m_rawChainGenerateExtra);
403 m_parser->getOption<
unsigned int>(m_option_rawChain_displayPeriod, m_rawChainDisplayPeriod);
404 m_parser->getOption<
bool >(m_option_rawChain_measureRunTimes, m_rawChainMeasureRunTimes);
405 m_parser->getOption<
unsigned int>(m_option_rawChain_dataOutputPeriod, m_rawChainDataOutputPeriod);
406 m_parser->getOption<std::string >(m_option_rawChain_dataOutputFileName, m_rawChainDataOutputFileName);
407 m_parser->getOption<std::string >(m_option_rawChain_dataOutputFileType, m_rawChainDataOutputFileType);
408 m_parser->getOption<
bool >(m_option_rawChain_dataOutputAllowAll, m_rawChainDataOutputAllowAll);
409 m_parser->getOption<std::set<unsigned int> >(m_option_rawChain_dataOutputAllowedSet, m_rawChainDataOutputAllowedSet);
410 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
411 m_parser->getOption<
bool >(m_option_rawChain_computeStats, m_rawChain_computeStats);
413 m_parser->getOption<
bool >(m_option_filteredChain_generate, m_filteredChainGenerate);
414 m_parser->getOption<
double >(m_option_filteredChain_discardedPortion, m_filteredChainDiscardedPortion);
415 m_parser->getOption<
unsigned int>(m_option_filteredChain_lag, m_filteredChainLag);
416 m_parser->getOption<std::string >(m_option_filteredChain_dataOutputFileName, m_filteredChainDataOutputFileName);
417 m_parser->getOption<std::string >(m_option_filteredChain_dataOutputFileType, m_filteredChainDataOutputFileType);
418 m_parser->getOption<
bool >(m_option_filteredChain_dataOutputAllowAll, m_filteredChainDataOutputAllowAll);
419 m_parser->getOption<std::set<unsigned int> >(m_option_filteredChain_dataOutputAllowedSet, m_filteredChainDataOutputAllowedSet);
420 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
421 m_parser->getOption<
bool >(m_option_filteredChain_computeStats, m_filteredChain_computeStats);
423 m_parser->getOption<
bool >(m_option_displayCandidates, m_displayCandidates);
424 m_parser->getOption<
bool >(m_option_putOutOfBoundsInChain, m_putOutOfBoundsInChain);
425 m_parser->getOption<
bool >(m_option_tk_useLocalHessian, m_tkUseLocalHessian);
426 m_parser->getOption<
bool >(m_option_tk_useNewtonComponent, m_tkUseNewtonComponent);
427 m_parser->getOption<
unsigned int>(m_option_dr_maxNumExtraStages, m_drMaxNumExtraStages);
428 m_parser->getOption<std::vector<double> >(m_option_dr_listOfScalesForExtraStages, m_drScalesForExtraStages);
429 m_parser->getOption<
bool >(m_option_dr_duringAmNonAdaptiveInt, m_drDuringAmNonAdaptiveInt);
430 m_parser->getOption<
bool >(m_option_am_keepInitialMatrix, m_amKeepInitialMatrix);
431 m_parser->getOption<
unsigned int>(m_option_am_initialNonAdaptInterval, m_amInitialNonAdaptInterval);
432 m_parser->getOption<
unsigned int>(m_option_am_adaptInterval, m_amAdaptInterval);
433 m_parser->getOption<
unsigned int>(m_option_am_adaptedMatrices_dataOutputPeriod, m_amAdaptedMatricesDataOutputPeriod);
434 m_parser->getOption<std::string >(m_option_am_adaptedMatrices_dataOutputFileName, m_amAdaptedMatricesDataOutputFileName);
435 m_parser->getOption<std::string >(m_option_am_adaptedMatrices_dataOutputFileType, m_amAdaptedMatricesDataOutputFileType);
436 m_parser->getOption<
bool >(m_option_am_adaptedMatrices_dataOutputAllowAll, m_amAdaptedMatricesDataOutputAllowAll);
437 m_parser->getOption<std::set<unsigned int> >(m_option_am_adaptedMatrices_dataOutputAllowedSet, m_amAdaptedMatricesDataOutputAllowedSet);
438 m_parser->getOption<
double >(m_option_am_eta, m_amEta);
439 m_parser->getOption<
double >(m_option_am_epsilon, m_amEpsilon);
440 m_parser->getOption<
unsigned int>(m_option_enableBrooksGelmanConvMonitor, m_enableBrooksGelmanConvMonitor);
441 m_parser->getOption<
unsigned int>(m_option_BrooksGelmanLag, m_BrooksGelmanLag);
442 m_parser->getOption<
bool >(m_option_outputLogLikelihood, m_outputLogLikelihood);
443 m_parser->getOption<
bool >(m_option_outputLogTarget, m_outputLogTarget);
444 m_parser->getOption<
bool >(m_option_doLogitTransform, m_doLogitTransform);
445 m_parser->getOption<std::string >(m_option_algorithm,
m_algorithm);
446 m_parser->getOption<std::string >(m_option_tk,
m_tk);
447 m_parser->getOption<
unsigned int>(m_option_updateInterval, m_updateInterval);
451 m_dataOutputAllowAll =
m_env->
input()(m_option_dataOutputAllowAll, UQ_MH_SG_DATA_OUTPUT_ALLOW_ALL_ODV);
454 unsigned int size =
m_env->
input().vector_variable_size(m_option_dataOutputAllowedSet);
455 for (
unsigned int i = 0; i <
size; i++) {
458 unsigned int allowed =
m_env->
input()(m_option_dataOutputAllowedSet, i, i);
459 m_dataOutputAllowedSet.insert(allowed);
462 m_totallyMute =
m_env->
input()(m_option_totallyMute, UQ_MH_SG_TOTALLY_MUTE_ODV);
463 m_initialPositionDataInputFileName =
m_env->
input()(m_option_initialPosition_dataInputFileName, UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_NAME_ODV);
464 m_initialPositionDataInputFileType =
m_env->
input()(m_option_initialPosition_dataInputFileType, UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_TYPE_ODV);
465 m_initialProposalCovMatrixDataInputFileName =
m_env->
input()(m_option_initialProposalCovMatrix_dataInputFileName, UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_NAME_ODV);
466 m_initialProposalCovMatrixDataInputFileType =
m_env->
input()(m_option_initialProposalCovMatrix_dataInputFileType, UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_TYPE_ODV);
470 size =
m_env->
input().vector_variable_size(m_option_listOfDisabledParameters);
471 for (
unsigned int i = 0; i <
size; i++) {
474 unsigned int disabled =
m_env->
input()(m_option_listOfDisabledParameters, i, i);
475 m_parameterDisabledSet.insert(disabled);
478 m_rawChainDataInputFileName =
m_env->
input()(m_option_rawChain_dataInputFileName, UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_NAME_ODV);
479 m_rawChainDataInputFileType =
m_env->
input()(m_option_rawChain_dataInputFileType, UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_TYPE_ODV);
480 m_rawChainSize =
m_env->
input()(m_option_rawChain_size, UQ_MH_SG_RAW_CHAIN_SIZE_ODV);
481 m_rawChainGenerateExtra =
m_env->
input()(m_option_rawChain_generateExtra, UQ_MH_SG_RAW_CHAIN_GENERATE_EXTRA_ODV);
482 m_rawChainDisplayPeriod =
m_env->
input()(m_option_rawChain_displayPeriod, UQ_MH_SG_RAW_CHAIN_DISPLAY_PERIOD_ODV);
483 m_rawChainMeasureRunTimes =
m_env->
input()(m_option_rawChain_measureRunTimes, UQ_MH_SG_RAW_CHAIN_MEASURE_RUN_TIMES_ODV);
484 m_rawChainDataOutputPeriod =
m_env->
input()(m_option_rawChain_dataOutputPeriod, UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_PERIOD_ODV);
485 m_rawChainDataOutputFileName =
m_env->
input()(m_option_rawChain_dataOutputFileName, UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_NAME_ODV);
486 m_rawChainDataOutputFileType =
m_env->
input()(m_option_rawChain_dataOutputFileType, UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV);
487 m_rawChainDataOutputAllowAll =
m_env->
input()(m_option_rawChain_dataOutputAllowAll, UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV);
490 size =
m_env->
input().vector_variable_size(m_option_rawChain_dataOutputAllowedSet);
491 for (
unsigned int i = 0; i <
size; i++) {
494 unsigned int allowed =
m_env->
input()(m_option_rawChain_dataOutputAllowedSet, i, i);
495 m_rawChainDataOutputAllowedSet.insert(allowed);
498 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
499 m_rawChain_computeStats =
m_env->
input()(m_option_rawChain_computeStats, UQ_MH_SG_RAW_CHAIN_COMPUTE_STATS_ODV);
501 m_filteredChainGenerate =
m_env->
input()(m_option_filteredChain_generate, UQ_MH_SG_FILTERED_CHAIN_GENERATE_ODV);
502 m_filteredChainDiscardedPortion =
m_env->
input()(m_option_filteredChain_discardedPortion, UQ_MH_SG_FILTERED_CHAIN_DISCARDED_PORTION_ODV);
503 m_filteredChainLag =
m_env->
input()(m_option_filteredChain_lag, UQ_MH_SG_FILTERED_CHAIN_LAG_ODV);
504 m_filteredChainDataOutputFileName =
m_env->
input()(m_option_filteredChain_dataOutputFileName, UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_NAME_ODV);
505 m_filteredChainDataOutputFileType =
m_env->
input()(m_option_filteredChain_dataOutputFileType, UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV);
506 m_filteredChainDataOutputAllowAll =
m_env->
input()(m_option_filteredChain_dataOutputAllowAll, UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV);
509 size =
m_env->
input().vector_variable_size(m_option_filteredChain_dataOutputAllowedSet);
510 for (
unsigned int i = 0; i <
size; i++) {
513 unsigned int allowed =
m_env->
input()(m_option_filteredChain_dataOutputAllowedSet, i, i);
514 m_filteredChainDataOutputAllowedSet.insert(allowed);
517 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
518 m_filteredChain_computeStats =
m_env->
input()(m_option_filteredChain_computeStats, UQ_MH_SG_FILTERED_CHAIN_COMPUTE_STATS_ODV);
520 m_displayCandidates =
m_env->
input()(m_option_displayCandidates, UQ_MH_SG_DISPLAY_CANDIDATES_ODV);
521 m_putOutOfBoundsInChain =
m_env->
input()(m_option_putOutOfBoundsInChain, UQ_MH_SG_PUT_OUT_OF_BOUNDS_IN_CHAIN_ODV);
522 m_tkUseLocalHessian =
m_env->
input()(m_option_tk_useLocalHessian, UQ_MH_SG_TK_USE_LOCAL_HESSIAN_ODV);
523 m_tkUseNewtonComponent =
m_env->
input()(m_option_tk_useNewtonComponent, UQ_MH_SG_TK_USE_NEWTON_COMPONENT_ODV);
524 m_drMaxNumExtraStages =
m_env->
input()(m_option_dr_maxNumExtraStages, UQ_MH_SG_DR_MAX_NUM_EXTRA_STAGES_ODV);
527 size =
m_env->
input().vector_variable_size(m_option_dr_listOfScalesForExtraStages);
528 for (
unsigned int i = 0; i <
size; i++) {
531 unsigned int allowed =
m_env->
input()(m_option_dr_listOfScalesForExtraStages, i, i);
532 m_drScalesForExtraStages.push_back(allowed);
535 m_drDuringAmNonAdaptiveInt =
m_env->
input()(m_option_dr_duringAmNonAdaptiveInt, UQ_MH_SG_DR_DURING_AM_NON_ADAPTIVE_INT_ODV);
536 m_amKeepInitialMatrix =
m_env->
input()(m_option_am_keepInitialMatrix, UQ_MH_SG_AM_KEEP_INITIAL_MATRIX_ODV);
537 m_amInitialNonAdaptInterval =
m_env->
input()(m_option_am_initialNonAdaptInterval, UQ_MH_SG_AM_INIT_NON_ADAPT_INT_ODV);
538 m_amAdaptInterval =
m_env->
input()(m_option_am_adaptInterval, UQ_MH_SG_AM_ADAPT_INTERVAL_ODV);
539 m_amAdaptedMatricesDataOutputPeriod =
m_env->
input()(m_option_am_adaptedMatrices_dataOutputPeriod, UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_PERIOD_ODV);
540 m_amAdaptedMatricesDataOutputFileName =
m_env->
input()(m_option_am_adaptedMatrices_dataOutputFileName, UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_NAME_ODV);
541 m_amAdaptedMatricesDataOutputFileType =
m_env->
input()(m_option_am_adaptedMatrices_dataOutputFileType, UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_TYPE_ODV);
542 m_amAdaptedMatricesDataOutputAllowAll =
m_env->
input()(m_option_am_adaptedMatrices_dataOutputAllowAll, UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOW_ALL_ODV);
545 size =
m_env->
input().vector_variable_size(m_option_am_adaptedMatrices_dataOutputAllowedSet);
546 for (
unsigned int i = 0; i <
size; i++) {
549 unsigned int allowed =
m_env->
input()(m_option_am_adaptedMatrices_dataOutputAllowedSet, i, i);
550 m_amAdaptedMatricesDataOutputAllowedSet.insert(allowed);
553 m_amEta =
m_env->
input()(m_option_am_eta, UQ_MH_SG_AM_ETA_ODV);
554 m_amEpsilon =
m_env->
input()(m_option_am_epsilon, UQ_MH_SG_AM_EPSILON_ODV);
555 m_enableBrooksGelmanConvMonitor =
m_env->
input()(m_option_enableBrooksGelmanConvMonitor, UQ_MH_SG_ENABLE_BROOKS_GELMAN_CONV_MONITOR);
556 m_BrooksGelmanLag =
m_env->
input()(m_option_BrooksGelmanLag, UQ_MH_SG_BROOKS_GELMAN_LAG);
557 m_outputLogLikelihood =
m_env->
input()(m_option_outputLogLikelihood, UQ_MH_SG_OUTPUT_LOG_LIKELIHOOD);
558 m_outputLogTarget =
m_env->
input()(m_option_outputLogTarget, UQ_MH_SG_OUTPUT_LOG_TARGET);
559 m_doLogitTransform =
m_env->
input()(m_option_doLogitTransform, UQ_MH_SG_DO_LOGIT_TRANSFORM);
562 m_updateInterval =
m_env->
input()(m_option_updateInterval, UQ_MH_SG_UPDATE_INTERVAL);
563 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
600 queso_require_greater_equal_msg(
m_filteredChainLag, 2,
"option `" << m_option_filteredChain_lag <<
"` must be at least 2");
628 queso_error_msg(
"random_walk transition kernel and logit_random_walk algorithm are incompatible options");
632 queso_error_msg(
"logit_random_walk transition kernel and random_walk algorithm are incompatible options");
635 if (
m_tk ==
"random_walk") {
639 "logit transform must be off to use random_walk");
643 "local Hessian must be off to use random_walk");
646 if (
m_tk ==
"logit_random_walk") {
650 "logit transform must be on to use logit_random_walk");
654 "local Hessian must be off to use logit_random_walk");
657 if (
m_tk ==
"stochastic_newton") {
661 "logit transform must be off to use stochastic_newton");
665 "local Hessian must be on to use stochastic_newton");
693 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
705 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
736 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
745 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
746 os << (*(obj.
m_parser)) << std::endl;
747 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
779 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
793 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
841 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
843 m_rawChainStatisticalOptionsObj (NULL),
844 m_rawChainStatOptsInstantiated (false),
845 m_filteredChainStatisticalOptionsObj (NULL),
846 m_filteredChainStatOptsInstantiated (false),
850 m_prefix ((std::string)(prefix) +
"mh_"),
852 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
853 m_optionsDesc (new boost::program_options::options_description(
"Bayesian Metropolis-Hastings options")),
855 m_option_help (m_prefix +
"help" ),
856 m_option_dataOutputFileName (m_prefix +
"dataOutputFileName" ),
857 m_option_dataOutputAllowAll (m_prefix +
"dataOutputAllowAll" ),
858 m_option_dataOutputAllowedSet (m_prefix +
"dataOutputAllowedSet" ),
859 m_option_totallyMute (m_prefix +
"totallyMute" ),
860 m_option_initialPosition_dataInputFileName (m_prefix +
"initialPosition_dataInputFileName" ),
861 m_option_initialPosition_dataInputFileType (m_prefix +
"initialPosition_dataInputFileType" ),
862 m_option_initialProposalCovMatrix_dataInputFileName(m_prefix +
"initialProposalCovMatrix_dataInputFileName"),
863 m_option_initialProposalCovMatrix_dataInputFileType(m_prefix +
"initialProposalCovMatrix_dataInputFileType"),
864 m_option_listOfDisabledParameters (m_prefix +
"listOfDisabledParameters" ),
865 m_option_rawChain_dataInputFileName (m_prefix +
"rawChain_dataInputFileName" ),
866 m_option_rawChain_dataInputFileType (m_prefix +
"rawChain_dataInputFileType" ),
867 m_option_rawChain_size (m_prefix +
"rawChain_size" ),
868 m_option_rawChain_generateExtra (m_prefix +
"rawChain_generateExtra" ),
869 m_option_rawChain_displayPeriod (m_prefix +
"rawChain_displayPeriod" ),
870 m_option_rawChain_measureRunTimes (m_prefix +
"rawChain_measureRunTimes" ),
871 m_option_rawChain_dataOutputPeriod (m_prefix +
"rawChain_dataOutputPeriod" ),
872 m_option_rawChain_dataOutputFileName (m_prefix +
"rawChain_dataOutputFileName" ),
873 m_option_rawChain_dataOutputFileType (m_prefix +
"rawChain_dataOutputFileType" ),
874 m_option_rawChain_dataOutputAllowAll (m_prefix +
"rawChain_dataOutputAllowAll" ),
875 m_option_rawChain_dataOutputAllowedSet (m_prefix +
"rawChain_dataOutputAllowedSet" ),
876 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
877 m_option_rawChain_computeStats (m_prefix +
"rawChain_computeStats" ),
879 m_option_filteredChain_generate (m_prefix +
"filteredChain_generate" ),
880 m_option_filteredChain_discardedPortion (m_prefix +
"filteredChain_discardedPortion" ),
881 m_option_filteredChain_lag (m_prefix +
"filteredChain_lag" ),
882 m_option_filteredChain_dataOutputFileName (m_prefix +
"filteredChain_dataOutputFileName" ),
883 m_option_filteredChain_dataOutputFileType (m_prefix +
"filteredChain_dataOutputFileType" ),
884 m_option_filteredChain_dataOutputAllowAll (m_prefix +
"filteredChain_dataOutputAllowAll" ),
885 m_option_filteredChain_dataOutputAllowedSet (m_prefix +
"filteredChain_dataOutputAllowedSet" ),
886 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
887 m_option_filteredChain_computeStats (m_prefix +
"filteredChain_computeStats" ),
889 m_option_displayCandidates (m_prefix +
"displayCandidates" ),
890 m_option_putOutOfBoundsInChain (m_prefix +
"putOutOfBoundsInChain" ),
891 m_option_tk_useLocalHessian (m_prefix +
"tk_useLocalHessian" ),
892 m_option_tk_useNewtonComponent (m_prefix +
"tk_useNewtonComponent" ),
893 m_option_dr_maxNumExtraStages (m_prefix +
"dr_maxNumExtraStages" ),
894 m_option_dr_listOfScalesForExtraStages (m_prefix +
"dr_listOfScalesForExtraStages" ),
895 m_option_dr_duringAmNonAdaptiveInt (m_prefix +
"dr_duringAmNonAdaptiveInt" ),
896 m_option_am_keepInitialMatrix (m_prefix +
"am_keepInitialMatrix" ),
897 m_option_am_initialNonAdaptInterval (m_prefix +
"am_initialNonAdaptInterval" ),
898 m_option_am_adaptInterval (m_prefix +
"am_adaptInterval" ),
899 m_option_am_adaptedMatrices_dataOutputPeriod (m_prefix +
"am_adaptedMatrices_dataOutputPeriod" ),
900 m_option_am_adaptedMatrices_dataOutputFileName (m_prefix +
"am_adaptedMatrices_dataOutputFileName" ),
901 m_option_am_adaptedMatrices_dataOutputFileType (m_prefix +
"am_adaptedMatrices_dataOutputFileType" ),
902 m_option_am_adaptedMatrices_dataOutputAllowAll (m_prefix +
"am_adaptedMatrices_dataOutputAllowAll" ),
903 m_option_am_adaptedMatrices_dataOutputAllowedSet (m_prefix +
"am_adaptedMatrices_dataOutputAllowedSet" ),
904 m_option_am_eta (m_prefix +
"am_eta" ),
905 m_option_am_epsilon (m_prefix +
"am_epsilon" ),
906 m_option_enableBrooksGelmanConvMonitor (m_prefix +
"enableBrooksGelmanConvMonitor" ),
907 m_option_BrooksGelmanLag (m_prefix +
"BrooksGelmanLag" ),
908 m_option_outputLogLikelihood (m_prefix +
"outputLogLikelihood" ),
909 m_option_outputLogTarget (m_prefix +
"outputLogTarget" ),
910 m_option_doLogitTransform (m_prefix +
"doLogitTransform" ),
911 m_option_algorithm (m_prefix +
"algorithm" ),
912 m_option_tk (m_prefix +
"tk" ),
913 m_option_updateInterval (m_prefix +
"updateInterval" )
925 m_ov (alternativeOptionsValues),
926 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
927 m_rawChainStatisticalOptionsObj (NULL),
928 m_rawChainStatOptsInstantiated (false),
929 m_filteredChainStatisticalOptionsObj (NULL),
930 m_filteredChainStatOptsInstantiated (false),
932 m_prefix ((std::string)(prefix) +
"mh_"),
934 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
937 m_option_help (m_prefix +
"help" ),
938 m_option_dataOutputFileName (m_prefix +
"dataOutputFileName" ),
939 m_option_dataOutputAllowAll (m_prefix +
"dataOutputAllowAll" ),
940 m_option_dataOutputAllowedSet (m_prefix +
"dataOutputAllowedSet" ),
941 m_option_totallyMute (m_prefix +
"totallyMute" ),
942 m_option_initialPosition_dataInputFileName (m_prefix +
"initialPosition_dataInputFileName" ),
943 m_option_initialPosition_dataInputFileType (m_prefix +
"initialPosition_dataInputFileType" ),
944 m_option_initialProposalCovMatrix_dataInputFileName(m_prefix +
"initialProposalCovMatrix_dataInputFileName"),
945 m_option_initialProposalCovMatrix_dataInputFileType(m_prefix +
"initialProposalCovMatrix_dataInputFileType"),
946 m_option_listOfDisabledParameters (m_prefix +
"listOfDisabledParameters" ),
947 m_option_rawChain_dataInputFileName (m_prefix +
"rawChain_dataInputFileName" ),
948 m_option_rawChain_dataInputFileType (m_prefix +
"rawChain_dataInputFileType" ),
949 m_option_rawChain_size (m_prefix +
"rawChain_size" ),
950 m_option_rawChain_generateExtra (m_prefix +
"rawChain_generateExtra" ),
951 m_option_rawChain_displayPeriod (m_prefix +
"rawChain_displayPeriod" ),
952 m_option_rawChain_measureRunTimes (m_prefix +
"rawChain_measureRunTimes" ),
953 m_option_rawChain_dataOutputPeriod (m_prefix +
"rawChain_dataOutputPeriod" ),
954 m_option_rawChain_dataOutputFileName (m_prefix +
"rawChain_dataOutputFileName" ),
955 m_option_rawChain_dataOutputFileType (m_prefix +
"rawChain_dataOutputFileType" ),
956 m_option_rawChain_dataOutputAllowAll (m_prefix +
"rawChain_dataOutputAllowAll" ),
957 m_option_rawChain_dataOutputAllowedSet (m_prefix +
"rawChain_dataOutputAllowedSet" ),
958 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
959 m_option_rawChain_computeStats (m_prefix +
"rawChain_computeStats" ),
961 m_option_filteredChain_generate (m_prefix +
"filteredChain_generate" ),
962 m_option_filteredChain_discardedPortion (m_prefix +
"filteredChain_discardedPortion" ),
963 m_option_filteredChain_lag (m_prefix +
"filteredChain_lag" ),
964 m_option_filteredChain_dataOutputFileName (m_prefix +
"filteredChain_dataOutputFileName" ),
965 m_option_filteredChain_dataOutputFileType (m_prefix +
"filteredChain_dataOutputFileType" ),
966 m_option_filteredChain_dataOutputAllowAll (m_prefix +
"filteredChain_dataOutputAllowAll" ),
967 m_option_filteredChain_dataOutputAllowedSet (m_prefix +
"filteredChain_dataOutputAllowedSet" ),
968 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
969 m_option_filteredChain_computeStats (m_prefix +
"filteredChain_computeStats" ),
971 m_option_displayCandidates (m_prefix +
"displayCandidates" ),
972 m_option_putOutOfBoundsInChain (m_prefix +
"putOutOfBoundsInChain" ),
973 m_option_tk_useLocalHessian (m_prefix +
"tk_useLocalHessian" ),
974 m_option_tk_useNewtonComponent (m_prefix +
"tk_useNewtonComponent" ),
975 m_option_dr_maxNumExtraStages (m_prefix +
"dr_maxNumExtraStages" ),
976 m_option_dr_listOfScalesForExtraStages (m_prefix +
"dr_listOfScalesForExtraStages" ),
977 m_option_dr_duringAmNonAdaptiveInt (m_prefix +
"dr_duringAmNonAdaptiveInt" ),
978 m_option_am_keepInitialMatrix (m_prefix +
"am_keepInitialMatrix" ),
979 m_option_am_initialNonAdaptInterval (m_prefix +
"am_initialNonAdaptInterval" ),
980 m_option_am_adaptInterval (m_prefix +
"am_adaptInterval" ),
981 m_option_am_adaptedMatrices_dataOutputPeriod (m_prefix +
"am_adaptedMatrices_dataOutputPeriod" ),
982 m_option_am_adaptedMatrices_dataOutputFileName (m_prefix +
"am_adaptedMatrices_dataOutputFileName" ),
983 m_option_am_adaptedMatrices_dataOutputFileType (m_prefix +
"am_adaptedMatrices_dataOutputFileType" ),
984 m_option_am_adaptedMatrices_dataOutputAllowAll (m_prefix +
"am_adaptedMatrices_dataOutputAllowAll" ),
985 m_option_am_adaptedMatrices_dataOutputAllowedSet (m_prefix +
"am_adaptedMatrices_dataOutputAllowedSet" ),
986 m_option_am_eta (m_prefix +
"am_eta" ),
987 m_option_am_epsilon (m_prefix +
"am_epsilon" ),
988 m_option_enableBrooksGelmanConvMonitor (m_prefix +
"enableBrooksGelmanConvMonitor" ),
989 m_option_BrooksGelmanLag (m_prefix +
"BrooksGelmanLag" ),
990 m_option_outputLogLikelihood (m_prefix +
"outputLogLikelihood" ),
991 m_option_outputLogTarget (m_prefix +
"outputLogTarget" ),
992 m_option_doLogitTransform (m_prefix +
"doLogitTransform" ),
993 m_option_algorithm (m_prefix +
"algorithm" ),
994 m_option_tk (m_prefix +
"tk" ),
995 m_option_updateInterval (m_prefix +
"updateInterval" )
1004 <<
": after setting values of options with prefix '" <<
m_prefix
1005 <<
"', state of object is:"
1010 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1025 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1027 m_rawChainStatisticalOptionsObj (NULL),
1028 m_rawChainStatOptsInstantiated (false),
1029 m_filteredChainStatisticalOptionsObj (NULL),
1030 m_filteredChainStatOptsInstantiated (false),
1034 m_prefix (mlOptions.m_prefix),
1035 m_env (mlOptions.env()),
1036 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
1039 m_option_help (m_prefix +
"help" ),
1040 m_option_dataOutputFileName (m_prefix +
"dataOutputFileName" ),
1041 m_option_dataOutputAllowAll (m_prefix +
"dataOutputAllowAll" ),
1042 m_option_dataOutputAllowedSet (m_prefix +
"dataOutputAllowedSet" ),
1043 m_option_totallyMute (m_prefix +
"totallyMute" ),
1044 m_option_initialPosition_dataInputFileName (m_prefix +
"initialPosition_dataInputFileName" ),
1045 m_option_initialPosition_dataInputFileType (m_prefix +
"initialPosition_dataInputFileType" ),
1046 m_option_initialProposalCovMatrix_dataInputFileName(m_prefix +
"initialProposalCovMatrix_dataInputFileName"),
1047 m_option_initialProposalCovMatrix_dataInputFileType(m_prefix +
"initialProposalCovMatrix_dataInputFileType"),
1048 m_option_listOfDisabledParameters (m_prefix +
"listOfDisabledParameters" ),
1049 m_option_rawChain_dataInputFileName (m_prefix +
"rawChain_dataInputFileName" ),
1050 m_option_rawChain_dataInputFileType (m_prefix +
"rawChain_dataInputFileType" ),
1051 m_option_rawChain_size (m_prefix +
"rawChain_size" ),
1052 m_option_rawChain_generateExtra (m_prefix +
"rawChain_generateExtra" ),
1053 m_option_rawChain_displayPeriod (m_prefix +
"rawChain_displayPeriod" ),
1054 m_option_rawChain_measureRunTimes (m_prefix +
"rawChain_measureRunTimes" ),
1055 m_option_rawChain_dataOutputPeriod (m_prefix +
"rawChain_dataOutputPeriod" ),
1056 m_option_rawChain_dataOutputFileName (m_prefix +
"rawChain_dataOutputFileName" ),
1057 m_option_rawChain_dataOutputFileType (m_prefix +
"rawChain_dataOutputFileType" ),
1058 m_option_rawChain_dataOutputAllowAll (m_prefix +
"rawChain_dataOutputAllowAll" ),
1059 m_option_rawChain_dataOutputAllowedSet (m_prefix +
"rawChain_dataOutputAllowedSet" ),
1060 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1061 m_option_rawChain_computeStats (m_prefix +
"rawChain_computeStats" ),
1063 m_option_filteredChain_generate (m_prefix +
"filteredChain_generate" ),
1064 m_option_filteredChain_discardedPortion (m_prefix +
"filteredChain_discardedPortion" ),
1065 m_option_filteredChain_lag (m_prefix +
"filteredChain_lag" ),
1066 m_option_filteredChain_dataOutputFileName (m_prefix +
"filteredChain_dataOutputFileName" ),
1067 m_option_filteredChain_dataOutputFileType (m_prefix +
"filteredChain_dataOutputFileType" ),
1068 m_option_filteredChain_dataOutputAllowAll (m_prefix +
"filteredChain_dataOutputAllowAll" ),
1069 m_option_filteredChain_dataOutputAllowedSet (m_prefix +
"filteredChain_dataOutputAllowedSet" ),
1070 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1071 m_option_filteredChain_computeStats (m_prefix +
"filteredChain_computeStats" ),
1073 m_option_displayCandidates (m_prefix +
"displayCandidates" ),
1074 m_option_putOutOfBoundsInChain (m_prefix +
"putOutOfBoundsInChain" ),
1075 m_option_tk_useLocalHessian (m_prefix +
"tk_useLocalHessian" ),
1076 m_option_tk_useNewtonComponent (m_prefix +
"tk_useNewtonComponent" ),
1077 m_option_dr_maxNumExtraStages (m_prefix +
"dr_maxNumExtraStages" ),
1078 m_option_dr_listOfScalesForExtraStages (m_prefix +
"dr_listOfScalesForExtraStages" ),
1079 m_option_dr_duringAmNonAdaptiveInt (m_prefix +
"dr_duringAmNonAdaptiveInt" ),
1080 m_option_am_keepInitialMatrix (m_prefix +
"am_keepInitialMatrix" ),
1081 m_option_am_initialNonAdaptInterval (m_prefix +
"am_initialNonAdaptInterval" ),
1082 m_option_am_adaptInterval (m_prefix +
"am_adaptInterval" ),
1083 m_option_am_adaptedMatrices_dataOutputPeriod (m_prefix +
"am_adaptedMatrices_dataOutputPeriod" ),
1084 m_option_am_adaptedMatrices_dataOutputFileName (m_prefix +
"am_adaptedMatrices_dataOutputFileName" ),
1085 m_option_am_adaptedMatrices_dataOutputFileType (m_prefix +
"am_adaptedMatrices_dataOutputFileType" ),
1086 m_option_am_adaptedMatrices_dataOutputAllowAll (m_prefix +
"am_adaptedMatrices_dataOutputAllowAll" ),
1087 m_option_am_adaptedMatrices_dataOutputAllowedSet (m_prefix +
"am_adaptedMatrices_dataOutputAllowedSet" ),
1088 m_option_am_eta (m_prefix +
"am_eta" ),
1089 m_option_am_epsilon (m_prefix +
"am_epsilon" ),
1090 m_option_enableBrooksGelmanConvMonitor (m_prefix +
"enableBrooksGelmanConvMonitor" ),
1091 m_option_BrooksGelmanLag (m_prefix +
"BrooksGelmanLag" ),
1092 m_option_outputLogLikelihood (m_prefix +
"outputLogLikelihood" ),
1093 m_option_outputLogTarget (m_prefix +
"outputLogTarget" ),
1094 m_option_doLogitTransform (m_prefix +
"doLogitTransform" ),
1095 m_option_algorithm (m_prefix +
"algorithm" ),
1096 m_option_tk (m_prefix +
"tk" ),
1097 m_option_updateInterval (m_prefix +
"updateInterval" )
1121 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1131 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1160 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1165 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1174 <<
": after copying values of options with prefix '" <<
m_prefix
1175 <<
"', state of object is:"
1185 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1197 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
1198 queso_require_msg(
m_optionsDesc,
"m_optionsDesc variable is NULL");
1203 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
1208 <<
": after reading values of options with prefix '" <<
m_prefix
1209 <<
"', state of object is:"
1214 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1235 <<
"\n" << m_option_dataOutputAllowedSet <<
" = ";
1237 os << *setIt <<
" ";
1244 <<
"\n" << m_option_listOfDisabledParameters <<
" = ";
1246 os << *setIt <<
" ";
1258 <<
"\n" << m_option_rawChain_dataOutputAllowedSet <<
" = ";
1260 os << *setIt <<
" ";
1263 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1272 <<
"\n" << m_option_filteredChain_dataOutputAllowedSet <<
" = ";
1274 os << *setIt <<
" ";
1277 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1285 <<
"\n" << m_option_dr_listOfScalesForExtraStages <<
" = ";
1297 <<
"\n" << m_option_am_adaptedMatrices_dataOutputAllowedSet <<
" = ";
1299 os << *setIt <<
" ";
1301 os <<
"\n" << m_option_am_eta <<
" = " <<
m_ov.
m_amEta
1309 <<
"\n" << m_option_tk <<
" = " <<
m_ov.
m_tk
1316 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
1323 optionsDesc.add_options()
1324 (m_option_help.c_str(),
"produce help msg for Bayesian Metropolis-Hastings" )
1325 (m_option_dataOutputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_DATA_OUTPUT_FILE_NAME_ODV ),
"name of generic output file" )
1326 (m_option_dataOutputAllowAll.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_DATA_OUTPUT_ALLOW_ALL_ODV ),
"allow all subEnvs write to a generic output file" )
1327 (m_option_dataOutputAllowedSet.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_DATA_OUTPUT_ALLOWED_SET_ODV ),
"subEnvs that will write to generic output file" )
1328 (m_option_totallyMute.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_TOTALLY_MUTE_ODV ),
"totally mute (no printout msg)" )
1329 (m_option_initialPosition_dataInputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_NAME_ODV ),
"name of input file for raw chain " )
1330 (m_option_initialPosition_dataInputFileType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_TYPE_ODV ),
"type of input file for raw chain " )
1331 (m_option_initialProposalCovMatrix_dataInputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_NAME_ODV),
"name of input file for raw chain " )
1332 (m_option_initialProposalCovMatrix_dataInputFileType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_TYPE_ODV),
"type of input file for raw chain " )
1333 (m_option_listOfDisabledParameters.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_LIST_OF_DISABLED_PARAMETERS_ODV ),
"list of disabled parameters" )
1334 (m_option_rawChain_dataInputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_NAME_ODV ),
"name of input file for raw chain " )
1335 (m_option_rawChain_dataInputFileType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_TYPE_ODV ),
"type of input file for raw chain " )
1336 (m_option_rawChain_size.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_RAW_CHAIN_SIZE_ODV ),
"size of raw chain" )
1337 (m_option_rawChain_generateExtra.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_RAW_CHAIN_GENERATE_EXTRA_ODV ),
"generate extra information about raw chain" )
1338 (m_option_rawChain_displayPeriod.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_RAW_CHAIN_DISPLAY_PERIOD_ODV ),
"period of msg display during raw chain generation" )
1339 (m_option_rawChain_measureRunTimes.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_RAW_CHAIN_MEASURE_RUN_TIMES_ODV ),
"measure run times" )
1340 (m_option_rawChain_dataOutputPeriod.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_PERIOD_ODV ),
"period of msg display during raw chain generation" )
1341 (m_option_rawChain_dataOutputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_NAME_ODV ),
"name of output file for raw chain " )
1342 (m_option_rawChain_dataOutputFileType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV ),
"type of output file for raw chain " )
1343 (m_option_rawChain_dataOutputAllowAll.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV ),
"allow all subEnvs to write raw chain to an output file" )
1344 (m_option_rawChain_dataOutputAllowedSet.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_ALLOWED_SET_ODV ),
"subEnvs that will write raw chain to output file" )
1345 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1346 (m_option_rawChain_computeStats.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_RAW_CHAIN_COMPUTE_STATS_ODV ),
"compute statistics on raw chain" )
1348 (m_option_filteredChain_generate.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_FILTERED_CHAIN_GENERATE_ODV ),
"generate filtered chain" )
1349 (m_option_filteredChain_discardedPortion.c_str(), boost::program_options::value<double >()->default_value(UQ_MH_SG_FILTERED_CHAIN_DISCARDED_PORTION_ODV ),
"initial discarded portion for chain filtering" )
1350 (m_option_filteredChain_lag.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_FILTERED_CHAIN_LAG_ODV ),
"spacing for chain filtering" )
1351 (m_option_filteredChain_dataOutputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_NAME_ODV ),
"name of output file for filtered chain" )
1352 (m_option_filteredChain_dataOutputFileType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV ),
"type of output file for filtered chain" )
1353 (m_option_filteredChain_dataOutputAllowAll.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV ),
"allow all subEnvs to write filt chain to an output file" )
1354 (m_option_filteredChain_dataOutputAllowedSet.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_ALLOWED_SET_ODV ),
"subEnvs that will write filt chain to output file" )
1355 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1356 (m_option_filteredChain_computeStats.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_FILTERED_CHAIN_COMPUTE_STATS_ODV ),
"compute statistics on filtered chain" )
1358 (m_option_displayCandidates.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_DISPLAY_CANDIDATES_ODV ),
"display candidates in the core MH algorithm" )
1359 (m_option_putOutOfBoundsInChain.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_PUT_OUT_OF_BOUNDS_IN_CHAIN_ODV ),
"put 'out of bound' candidates in chain as well" )
1360 (m_option_tk_useLocalHessian.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_TK_USE_LOCAL_HESSIAN_ODV ),
"'proposal' use local Hessian" )
1361 (m_option_tk_useNewtonComponent.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_TK_USE_NEWTON_COMPONENT_ODV ),
"'proposal' use Newton component" )
1362 (m_option_dr_maxNumExtraStages.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_DR_MAX_NUM_EXTRA_STAGES_ODV ),
"'dr' maximum number of extra stages" )
1363 (m_option_dr_listOfScalesForExtraStages.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_DR_LIST_OF_SCALES_FOR_EXTRA_STAGES_ODV ),
"'dr' scales for prop cov matrices from 2nd stage on" )
1364 (m_option_dr_duringAmNonAdaptiveInt.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_DR_DURING_AM_NON_ADAPTIVE_INT_ODV ),
"'dr' used during 'am' non adaptive interval" )
1365 (m_option_am_keepInitialMatrix.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_AM_KEEP_INITIAL_MATRIX_ODV ),
"'am' keep initial (given) matrix" )
1366 (m_option_am_initialNonAdaptInterval.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_AM_INIT_NON_ADAPT_INT_ODV ),
"'am' initial non adaptation interval" )
1367 (m_option_am_adaptInterval.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_AM_ADAPT_INTERVAL_ODV ),
"'am' adaptation interval" )
1368 (m_option_am_adaptedMatrices_dataOutputPeriod.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_PERIOD_ODV ),
"period for outputting 'am' adapted matrices" )
1369 (m_option_am_adaptedMatrices_dataOutputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_NAME_ODV ),
"name of output file for 'am' adapted matrices" )
1370 (m_option_am_adaptedMatrices_dataOutputFileType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_TYPE_ODV ),
"type of output file for 'am' adapted matrices" )
1371 (m_option_am_adaptedMatrices_dataOutputAllowAll.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOW_ALL_ODV ),
"type of output file for 'am' adapted matrices" )
1372 (m_option_am_adaptedMatrices_dataOutputAllowedSet.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOWED_SET_ODV ),
"type of output file for 'am' adapted matrices" )
1373 (m_option_am_eta.c_str(), boost::program_options::value<double >()->default_value(UQ_MH_SG_AM_ETA_ODV ),
"'am' eta" )
1374 (m_option_am_epsilon.c_str(), boost::program_options::value<double >()->default_value(UQ_MH_SG_AM_EPSILON_ODV ),
"'am' epsilon" )
1375 (m_option_enableBrooksGelmanConvMonitor.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_ENABLE_BROOKS_GELMAN_CONV_MONITOR ),
"assess convergence using Brooks-Gelman metric" )
1376 (m_option_BrooksGelmanLag.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_BROOKS_GELMAN_LAG ),
"number of chain positions before starting to compute metric")
1377 (m_option_outputLogLikelihood.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_OUTPUT_LOG_LIKELIHOOD ),
"flag to toggle output of log likelihood values" )
1378 (m_option_outputLogTarget.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_OUTPUT_LOG_TARGET ),
"flag to toggle output of log target values" )
1379 (m_option_doLogitTransform.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_DO_LOGIT_TRANSFORM ),
"flag to toggle logit transform for bounded domains" )
1380 (m_option_algorithm.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_ALGORITHM ),
"which mcmc algorithm to use" )
1381 (m_option_tk.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_TK ),
"which mcmc tk to use" )
1382 (m_option_updateInterval.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_UPDATE_INTERVAL ),
"how often to call updateTK method" )
1387 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
1389 #ifndef QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
1417 std::vector<double> tmpAllow(0,0.);
1421 if (tmpAllow.size() > 0) {
1422 for (
unsigned int i = 0; i < tmpAllow.size(); ++i) {
1440 if (
m_env.
allOptionsMap().count(m_option_initialProposalCovMatrix_dataInputFileName)) {
1444 if (
m_env.
allOptionsMap().count(m_option_initialProposalCovMatrix_dataInputFileType)) {
1450 std::vector<double> tmpAllow(0,0.);
1453 if (tmpAllow.size() > 0) {
1454 for (
unsigned int i = 0; i < tmpAllow.size(); ++i) {
1501 std::vector<double> tmpAllow(0,0.);
1505 if (tmpAllow.size() > 0) {
1506 for (
unsigned int i = 0; i < tmpAllow.size(); ++i) {
1512 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1534 std::cerr <<
"WARNING In MetropolisHastingsSG<P_V,P_M>::getMyOptionsValues()"
1540 <<
": forcing the value of '" << m_option_filteredChain_lag
1555 if (
m_env.
allOptionsMap().count(m_option_filteredChain_dataOutputAllowAll.c_str())) {
1564 std::vector<double> tmpAllow(0,0.);
1568 if (tmpAllow.size() > 0) {
1569 for (
unsigned int i = 0; i < tmpAllow.size(); ++i) {
1575 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1600 std::vector<double> tmpScales(0,0.);
1615 unsigned int tmpSize = tmpScales.size();
1620 if (i < tmpSize) scale = tmpScales[i];
1654 if (
m_env.
allOptionsMap().count(m_option_am_adaptedMatrices_dataOutputAllowAll.c_str())) {
1661 else if (
m_env.
allOptionsMap().count(m_option_am_adaptedMatrices_dataOutputAllowedSet)) {
1663 std::vector<double> tmpAllow(0,0.);
1667 if (tmpAllow.size() > 0) {
1668 for (
unsigned int i = 0; i < tmpAllow.size(); ++i) {
1714 #endif // QUESO_DISABLE_BOOST_PROGRAM_OPTIONS
unsigned int m_rawChainDataOutputPeriod
Period of message display during raw chain generation.
SequenceStatisticalOptions * m_filteredChainStatisticalOptionsObj
bool m_drDuringAmNonAdaptiveInt
Do delayed rejection during the initial non-adaptive part of sampling?
std::string m_amAdaptedMatricesDataOutputFileName
Name of output file for 'am' adapted matrices.
bool m_rawChainComputeStats
Compute statistics on raw chain.
std::string m_option_initialProposalCovMatrix_dataInputFileType
Option name for MhOptionsValues::m_initialProposalCovMatrixDataInputFileType. Option name is m_prefix...
std::string m_option_dataOutputFileName
std::string m_option_algorithm
std::string m_option_am_keepInitialMatrix
Option name for MhOptionsValues::m_amKeepInitialMatrix. Option name is m_prefix + "mh_am_keepInitialM...
bool m_filteredChainGenerate
Whether or not to generate filtered chain.
std::string m_rawChainDataOutputFileName
If not ".", filename to write the Markov chain to.
void scanOptionsValues()
It scans the option values from the options input file.
unsigned int m_drMaxNumExtraStages
'dr' maximum number of extra stages.
bool m_putOutOfBoundsInChain
Flag to tell QUESO how chains should be upon generating a proposal that is out of the problem domain...
bool m_rawChainDataOutputAllowAll
Whether or not subEnvs will write to output file for raw chain.
std::string m_option_am_adaptInterval
std::string m_algorithm
Which algorithm to use for sampling.
std::string m_option_outputLogLikelihood
unsigned int subId() const
Access function to the number of each sub-environment Id: m_subId.
bool m_amKeepInitialMatrix
This option is a no-op. The default is false.
std::set< unsigned int > m_amAdaptedMatricesDataOutputAllowedSet
subEnvs that will write to output file for 'am' adapted matrices.
std::string m_option_rawChain_measureRunTimes
Option name for MhOptionsValues::m_rawChainMeasureRunTimes. Option name is m_prefix + "mh_rawChain_me...
bool m_totallyMute
Whether or not to be totally mute (no printout message).
std::string m_option_rawChain_size
Option name for MhOptionsValues::m_rawChainSize. Option name is m_prefix + "mh_rawChain_size".
std::string m_option_displayCandidates
std::string m_rawChainDataOutputFileType
The filetype of m_rawChainDataOutputFileName.
std::string m_tk
Which transition kernel to use for MCMC. Default is "random_walk".
std::string m_option_updateInterval
Option name for MhOptionsValues::m_updateInterval. Option name is m_prefix + "mh_updateInterval".
void checkOptions(const BaseEnvironment *env)
std::string m_option_dr_listOfScalesForExtraStages
MhOptionsValues & operator=(const MhOptionsValues &rhs)
Assignment operator; it copies rhs to this.
std::string m_initialProposalCovMatrixDataInputFileName
If not ".", reads the contents of the file as the initial proposal covariance matrix.
std::string m_rawChainDataInputFileName
Name of input file for raw chain.
bool m_displayCandidates
Display candidates generated in the core MH algorithm.
bool m_amAdaptedMatricesDataOutputAllowAll
Whether or not subEnvs will write to output file for 'am' adapted matrices.
std::string m_option_rawChain_measureRunTimes
std::string m_option_rawChain_generateExtra
Option name for MhOptionsValues::m_rawChainGenerateExtra. Option name is m_prefix + "mh_rawChain_gene...
std::string m_option_rawChain_dataOutputFileType
Option name for MhOptionsValues::m_rawChainDataOutputFileType. Option name is m_prefix + "mh_rawChain...
bool m_totallyMute
If true, zero output is written to files. Default is false.
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
unsigned int m_amInitialNonAdaptInterval
The number of initial samples to do without adapting the proposal covariance matrix.
std::string m_initialPositionDataInputFileName
If not ".", reads the contents of the file and uses that to start the MCMC. Default is "...
std::string m_option_tk_useLocalHessian
Option name for MhOptionsValues::m_tkUseLocalHessian. Option name is m_prefix + "mh_tk_useLocalHessia...
std::string m_option_algorithm
Option name for MhOptionsValues::m_algorithm. Option name is m_prefix + "mh_algorithm".
A templated class that stores statistical options (optionally read from an input file) ...
std::string m_option_rawChain_dataInputFileType
Option name for MhOptionsValues::m_rawChainDataInputFileType. Option name is m_prefix + "mh_rawChain_...
std::string m_option_filteredChain_generate
Option name for MhOptionsValues::m_filteredChainGenerate. Option name is m_prefix + "mh_filteredChain...
unsigned int m_BrooksGelmanLag
The lag with which to compute the Brooks-Gelman convergence statistic.
std::string m_initialPositionDataInputFileName
Name of input file for initial position.
std::string m_option_initialProposalCovMatrix_dataInputFileName
Option name for MhOptionsValues::m_initialProposalCovMatrixDataInputFileName. Option name is m_prefix...
std::string m_option_putOutOfBoundsInChain
Option name for MhOptionsValues::m_putOutOfBoundsInChain. Option name is m_prefix + "mh_putOutOfBound...
std::string m_option_am_adaptedMatrices_dataOutputFileType
Option name for MhOptionsValues::m_amAdaptedMatricesDataOutputFileType. Option name is m_prefix + "mh...
std::string m_initialProposalCovMatrixDataInputFileName
Name of input file for initial proposal covariance matrix.
boost::program_options::variables_map & allOptionsMap() const
const BaseEnvironment & m_env
This class reads the options for the Metropolis-Hastings generator of samples from an input file...
unsigned int m_rawChainSize
Size of raw chain.
std::string m_option_listOfDisabledParameters
Option name for MhOptionsValues::m_parameterDisabledSet. Option name is m_prefix + "mh_listOfDisabled...
SsOptionsValues m_alternativeRawSsOptionsValues
std::ostream & operator<<(std::ostream &os, const SequenceStatisticalOptions &obj)
std::string m_option_rawChain_dataOutputFileName
Option name for MhOptionsValues::m_rawChainDataOutputFileName. Option name is m_prefix + "mh_rawChain...
std::string m_option_outputLogTarget
Option name for MhOptionsValues::m_outputLogTarget. Option name is m_prefix + "mh_outputLogTarget".
unsigned int m_enableBrooksGelmanConvMonitor
The frequency with which to compute the Brooks-Gelman convergence statistic.
std::string m_option_BrooksGelmanLag
Option name for MhOptionsValues::m_BrooksGelmanLag. Option name is m_prefix + "mh_BrooksGelmanLag".
bool m_rawChainMeasureRunTimes
If true, measures timings spent in various chain computions and writes them to the output file...
void print(std::ostream &os) const
It prints the option values.
const GetPot & input() const
The GetPot input file parser.
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix queso_require_not_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the absence of an options input file"))
std::string m_option_rawChain_dataOutputFileType
std::string m_rawChainDataOutputFileType
Type of output file for raw chain.
int subRank() const
Returns the rank of the MPI process in the sub-communicator subComm()
bool m_filteredChainStatOptsInstantiated
std::string m_rawChainDataInputFileType
The filetype of m_rawChainDataInputFileName. Only "m" (matlab) is currently supported. Default is "m".
bool m_tkUseLocalHessian
Flag to tell QUESO whether or not to use Hessian information for the proposal covariance matrix...
std::string m_option_rawChain_displayPeriod
double m_amEta
'am' eta.
bool m_filteredChainGenerate
Toggle the option to save a filtered chain.
std::set< unsigned int > m_rawChainDataOutputAllowedSet
The set of MPI ranks that will write Markov chain output to a file. See also m_rawChainDataOutputAllo...
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
virtual ~MhOptionsValues()
Destructor.
std::string m_option_initialPosition_dataInputFileName
std::string m_option_filteredChain_lag
Option name for MhOptionsValues::m_filteredChainLag. Option name is m_prefix + "mh_filteredChain_lag"...
const BaseEnvironment & m_env
bool m_rawChainGenerateExtra
Generate extra information about raw chain.
std::string m_initialPositionDataInputFileType
Type of input file for initial position.
std::string m_option_totallyMute
bool m_doLogitTransform
Whether or not a logit transform will be done for bounded domains.
std::string m_option_filteredChain_dataOutputFileType
Option name for MhOptionsValues::m_filteredChainDataOutputFileType. Option name is m_prefix + "mh_fil...
std::string m_option_initialPosition_dataInputFileType
Option name for MhOptionsValues::m_initialPositionDataInputFileType. Option name is m_prefix + "mh_in...
SharedPtr< BaseTKGroup< P_V, P_M > >::Type m_tk
std::string m_option_am_keepInitialMatrix
std::string m_option_rawChain_displayPeriod
Option name for MhOptionsValues::m_rawChainDisplayPeriod. Option name is m_prefix + "mh_rawChain_disp...
MhOptionsValues()
Default constructor.
std::string m_option_dataOutputAllowedSet
Option name for MhOptionsValues::m_dataOutputAllowedSet. Option name is m_prefix + "mh_dataOutputAllo...
std::string m_option_rawChain_dataInputFileName
Option name for MhOptionsValues::m_rawChainDataInputFileName. Option name is m_prefix + "mh_rawChain_...
std::string m_amAdaptedMatricesDataOutputFileName
If not ".", this is the file to write adapted proposal covariance matrices to. Default is "...
std::string m_amAdaptedMatricesDataOutputFileType
The filetype of m_amAdaptedMatricesDataOutputFileName. Only "m" (matlab) is currently supported...
bool m_putOutOfBoundsInChain
Put 'out of bound' candidates in chain as well.
int worldRank() const
Returns the same thing as fullRank()
unsigned int m_amInitialNonAdaptInterval
'am' initial non adaptation interval
bool m_filteredChainDataOutputAllowAll
Toggle for whether or not to allow all processes to write filtered Markov chain output to a file...
bool m_displayCandidates
Toggle to tell QUESO whether or not to write proposal (candidate) state to output file...
MetropolisHastingsSGOptions(const BaseEnvironment &env, const char *prefix)
Constructor: reads options from the input file.
std::string m_option_am_epsilon
Option name for MhOptionsValues::m_amEpsilon. Option name is m_prefix + "mh_am_epsilon".
std::set< unsigned int > m_parameterDisabledSet
Set of parameters that don't get sampled.
std::string m_option_filteredChain_dataOutputAllowAll
Option name for MhOptionsValues::m_filteredChainDataOutputAllowAll. Option name is m_prefix + "mh_fil...
This class provides options for the Metropolis-Hastings generator of samples if no input file is avai...
unsigned int m_filteredChainLag
Spacing for chain filtering.
std::string m_option_tk_useNewtonComponent
Option name for MhOptionsValues::m_tkUseNewtonComponent. Option name is m_prefix + "mh_tk_useNewtonCo...
int fullRank() const
Returns the rank of the MPI process in QUESO's full communicator.
std::string m_option_filteredChain_dataOutputFileName
unsigned int m_amAdaptInterval
'am' adaptation interval.
std::string m_option_updateInterval
std::string m_option_am_initialNonAdaptInterval
std::string m_option_BrooksGelmanLag
std::string m_option_am_adaptedMatrices_dataOutputPeriod
std::string m_option_rawChain_generateExtra
std::string m_option_doLogitTransform
Option name for MhOptionsValues::m_doLogitTransform. Option name is m_prefix + "mh_doLogitTransform"...
std::string m_option_rawChain_dataOutputPeriod
Option name for MhOptionsValues::m_rawChainDataOutputPeriod. Option name is m_prefix + "mh_rawChain_d...
std::string m_option_outputLogTarget
std::string m_option_dataOutputAllowedSet
unsigned int m_updateInterval
How often to call the TK's updateTK method. Default is 1.
SequenceStatisticalOptions * m_rawChainStatisticalOptionsObj
std::string m_filteredChainDataOutputFileName
Name of output file for filtered chain.
MhOptionsValues m_ov
This class is where the actual options are stored.
std::string m_option_dataOutputFileName
Option name for MhOptionsValues::m_dataOutputFileName. Option name is m_prefix + "mh_dataOutputFileNa...
std::string m_option_am_eta
Option name for MhOptionsValues::m_amEta. Option name is m_prefix + "mh_am_eta".
std::string m_initialProposalCovMatrixDataInputFileType
The filetype of m_initialProposalCovMatrixDataInputFileName. Only "m" (matlab) is currently supported...
double m_amEpsilon
Regularisation parameter for the DRAM covariance matrix.
bool m_tkUseNewtonComponent
This option is a no-op. Default is true.
bool m_outputLogLikelihood
Flag for deciding whether or not to dump log likelihood values in output. Default is true...
std::string m_rawChainDataOutputFileName
Name of output file for raw chain.
std::string m_option_tk_useNewtonComponent
std::set< unsigned int > m_filteredChainDataOutputAllowedSet
The set of MPI ranks that will write filtered Markov chain output to a file. See also m_filteredChain...
std::string m_dataOutputFileName
The base name of output files where the chain (and related information) will be written.
std::string m_option_am_eta
See MhOptionsValues::m_amEta.
std::string m_tk
Which transition kernel to use for sampling.
void MiscReadDoublesFromString(const std::string &inputString, std::vector< double > &outputDoubles)
std::string m_option_filteredChain_discardedPortion
std::set< unsigned int > m_dataOutputAllowedSet
subEnvs that will write to generic output file.
std::string m_option_filteredChain_computeStats
std::string m_dataOutputFileName
Name of generic output file.
unsigned int m_updateInterval
How often to call the TK's updateTK method.
SsOptionsValues m_alternativeFilteredSsOptionsValues
unsigned int m_rawChainDisplayPeriod
Period of message display during raw chain generation.
std::string m_initialPositionDataInputFileType
The filetype of m_initialPositionDataInputFileName. Only "m" (matlab) is currently supported...
std::string m_rawChainDataInputFileName
Filename for reading an already-produced Markov chain.
std::string m_filteredChainDataOutputFileType
The filetype of m_filteredChainDataOutputFileName. Only "m" (matlab) is currently supported...
std::string m_option_am_epsilon
See MhOptionsValues::m_amEpsilon.
std::string m_option_am_adaptedMatrices_dataOutputPeriod
Option name for MhOptionsValues::m_amAdaptedMatricesDataOutputPeriod. Option name is m_prefix + "mh_a...
std::string m_option_outputLogLikelihood
Option name for MhOptionsValues::m_outputLogLikelihood. Option name is m_prefix + "mh_outputLogLikeli...
bool m_dataOutputAllowAll
subEnvs that will write to generic output file.
bool m_tkUseNewtonComponent
Whether or not 'proposal' uses Newton component.
void scanInputFileForMyOptions(const boost::program_options::options_description &optionsDesc) const
This method scans the input file provided by the user to QUESO.
bool m_doLogitTransform
Flag for deciding whether or not to do logit transform of bounded domains Default is true...
std::string m_option_rawChain_dataInputFileType
std::string m_option_tk_useLocalHessian
std::string m_option_filteredChain_dataOutputAllowedSet
Option name for MhOptionsValues::m_filteredChainDataOutputAllowedSet. Option name is m_prefix + "mh_f...
SequenceStatisticalOptions * m_rawChainStatisticalOptionsObj
std::string m_option_filteredChain_generate
std::string m_option_initialProposalCovMatrix_dataInputFileType
This class provides options for each level of the Multilevel sequence generator if no input file is a...
void getMyOptionValues(boost::program_options::options_description &optionsDesc)
Gets the sequence options defined to the Metropolis-Hastings algorithm.
~MetropolisHastingsSGOptions()
Destructor.
std::string m_option_filteredChain_discardedPortion
Option name for MhOptionsValues::m_filteredChainDiscardedPortion. Option name is m_prefix + "mh_filte...
std::string m_initialProposalCovMatrixDataInputFileType
Type of input file for initial proposal covariance matrix.
bool m_rawChainGenerateExtra
If true, extra chain information is computed/stored.
unsigned int m_amAdaptInterval
The frequency at which to adapt the proposal covariance matrix.
std::string m_option_rawChain_dataOutputAllowAll
std::string m_option_displayCandidates
Option name for MhOptionsValues::m_displayCandidates. Option name is m_prefix + "mh_displayCandidates...
double m_amEta
Proposal covariance scaling factor, usually 2.4 * 2.4 / d.
std::string m_option_dr_duringAmNonAdaptiveInt
std::string m_option_rawChain_dataInputFileName
std::string m_option_am_adaptedMatrices_dataOutputAllowAll
unsigned int m_rawChainDataOutputPeriod
The frequency with which to write chain output. Defaults to 0.
bool m_filteredChainComputeStats
Compute statistics on filtered chain.
bool m_tkUseLocalHessian
Whether or not 'proposal' uses local Hessian.
std::string m_amAdaptedMatricesDataOutputFileType
Type of output file for 'am' adapted matrices.
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
SharedPtr< Algorithm< P_V, P_M > >::Type m_algorithm
std::string m_option_dataOutputAllowAll
Option name for MhOptionsValues::m_dataOutputAllowAll. Option name is m_prefix + "mh_dataOutputAllowA...
std::string m_option_am_adaptedMatrices_dataOutputAllowedSet
std::string m_option_initialPosition_dataInputFileName
Option name for MhOptionsValues::m_initialPositionDataInputFileName. Option name is m_prefix + "mh_in...
bool m_filteredChainDataOutputAllowAll
Whether or not subEnvs will write to output file for filtered chain.
std::set< unsigned int > m_rawChainDataOutputAllowedSet
subEnvs that will write to output file for raw chain.
std::set< unsigned int > m_amAdaptedMatricesDataOutputAllowedSet
This option is a no-op. The default is the empty set.
std::string m_option_dataOutputAllowAll
std::string m_option_dr_listOfScalesForExtraStages
Option name for MhOptionsValues::m_drScalesForExtraStages. Option name is m_prefix + "mh_dr_listOfSca...
std::string m_option_doLogitTransform
std::string m_option_am_adaptedMatrices_dataOutputAllowAll
Option name for MhOptionsValues::m_amAdaptedMatricesDataOutputAllowAll. Option name is m_prefix + "mh...
std::string m_option_rawChain_computeStats
std::string m_option_filteredChain_computeStats
Option name for MhOptionsValues::m_filteredChainComputeStats. Option name is m_prefix + "mh_filteredC...
ScopedPtr< BoostInputOptionsParser >::Type m_parser
unsigned int m_filteredChainLag
Set the lag for the filtered chain. Default is 1.
std::string m_option_enableBrooksGelmanConvMonitor
std::string m_algorithm
Which algorithm to use for the MCMC. Default is "random_walk".
std::string m_rawChainDataInputFileType
Type of input file for raw chain.
std::string m_filteredChainDataOutputFileName
If not ".", file name to save the filtered chain to. Default is ".".
std::string m_option_dr_maxNumExtraStages
Option name for MhOptionsValues::m_drMaxNumExtraStages. Option name is m_prefix + "mh_dr_maxNumExtraS...
std::set< unsigned int > m_dataOutputAllowedSet
The set of MPI ranks that can write output. See m_dataOutputAllowAll.
bool m_rawChainDataOutputAllowAll
Toggle for whether or not to allow all processes to write Markov chain output to a file...
std::string m_option_filteredChain_dataOutputAllowAll
std::string m_option_am_adaptedMatrices_dataOutputFileName
Option name for MhOptionsValues::m_amAdaptedMatricesDataOutputFileName. Option name is m_prefix + "mh...
unsigned int m_rawChainSize
The size of the chain (number of posterior samples) to generate. Default is 100.
std::string m_option_totallyMute
Option name for MhOptionsValues::m_totallyMute. Option name is m_prefix + "mh_totallyMute".
unsigned int m_drMaxNumExtraStages
The number of delayed rejection stages to do. Default is 0.
bool m_drDuringAmNonAdaptiveInt
Whether or not 'dr' is used during 'am' non adaptive interval.
bool m_amKeepInitialMatrix
Whether or not 'am' will keep initial (given) matrix.
ScopedPtr< boost::program_options::options_description >::Type m_optionsDesc
std::string m_option_filteredChain_lag
std::string m_option_rawChain_size
bool m_amAdaptedMatricesDataOutputAllowAll
This option is a no-op. The default is false.
std::string m_option_putOutOfBoundsInChain
std::string m_option_initialProposalCovMatrix_dataInputFileName
double m_filteredChainDiscardedPortion
Initial discarded portion for chain filtering.
std::vector< double > m_drScalesForExtraStages
'dr' list of scales for proposal covariance matrices from 2nd stage on.
std::set< unsigned int > m_parameterDisabledSet
std::set< unsigned int > m_filteredChainDataOutputAllowedSet
subEnvs that will write to output file for filtered chain.
unsigned int m_amAdaptedMatricesDataOutputPeriod
The frequency (after m_amInitialNonAdaptInterval samples are done) of printing the last adapted propo...
std::string m_option_rawChain_dataOutputAllowedSet
bool m_rawChainStatOptsInstantiated
std::string m_option_filteredChain_dataOutputAllowedSet
std::string m_option_filteredChain_dataOutputFileType
void defineMyOptions(boost::program_options::options_description &optionsDesc) const
Defines the options for the Metropolis-Hastings generator of samples as the default options...
bool m_outputLogTarget
Flag for deciding whether or not to dump log target values in output Default is true.
std::string m_option_rawChain_computeStats
Option name for MhOptionsValues::m_rawChainComputeStats. Option name is m_prefix + "mh_rawChain_compu...
std::vector< double > m_drScalesForExtraStages
The vector of scale factors for the proposal covariance matrix to use for delayed rejection...
unsigned int m_rawChainDisplayPeriod
The frequency with which to output diagnostic information.
std::string m_filteredChainDataOutputFileType
Type of output file for filtered chain.
int inter0Rank() const
Returns the process inter0 rank.
std::string m_option_listOfDisabledParameters
bool m_filteredChainComputeStats
Toggle to tell QUESO whether or not to compute statistics on the filtered chain. Default is false...
SequenceStatisticalOptions * m_filteredChainStatisticalOptionsObj
std::string m_option_dr_maxNumExtraStages
std::string m_option_rawChain_dataOutputFileName
std::string m_option_am_adaptedMatrices_dataOutputAllowedSet
Option name for MhOptionsValues::m_amAdaptedMatricesDataOutputAllowedSet. Option name is m_prefix + "...
bool m_rawChainComputeStats
Flag to tell QUESO whether or not to compute chain statistics. Default is false.
bool m_dataOutputAllowAll
If true, all processes write output and m_dataOutputAllowedSet is ignored.
double m_amEpsilon
'am' epsilon.
std::string m_option_dr_duringAmNonAdaptiveInt
Option name for MhOptionsValues::m_drDuringAmNonAdaptiveInt. Option name is m_prefix + "mh_dr_duringA...
void copy(const MhOptionsValues &src)
Copies the option values from src to this.
std::string m_option_rawChain_dataOutputAllowedSet
Option name for MhOptionsValues::m_rawChainDataOutputAllowedSet. Option name is m_prefix + "mh_rawCha...
std::string m_option_enableBrooksGelmanConvMonitor
Option name for MhOptionsValues::m_enableBrooksGelmanConvMonitor. Option name is m_prefix + "mh_enabl...
std::string m_option_am_adaptInterval
Option name for MhOptionsValues::m_amAdaptInterval. Option name is m_prefix + "mh_am_adaptInterval".
std::string m_option_rawChain_dataOutputAllowAll
Option name for MhOptionsValues::m_rawChainDataOutputAllowAll. Option name is m_prefix + "mh_rawChain...
std::string m_option_am_adaptedMatrices_dataOutputFileName
std::string m_option_tk
Option name for MhOptionsValues::m_tk. Option name is m_prefix + "mh_tk".
std::string m_option_rawChain_dataOutputPeriod
std::string m_option_initialPosition_dataInputFileType
std::string m_option_am_initialNonAdaptInterval
Option name for MhOptionsValues::m_amInitialNonAdaptInterval. Option name is m_prefix + "mh_am_initia...
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
std::string m_option_filteredChain_dataOutputFileName
Option name for MhOptionsValues::m_filteredChainDataOutputFileName. Option name is m_prefix + "mh_fil...
bool m_rawChainMeasureRunTimes
Whether or not to measure run times.
unsigned int m_amAdaptedMatricesDataOutputPeriod
Period for outputing 'am' adapted matrices.
std::string m_option_am_adaptedMatrices_dataOutputFileType
double m_filteredChainDiscardedPortion
What initial fraction of the filtered chain is discarded.
A templated class that stores default statistical options for a sequence of vectors, e.g. a Markov chain, a Monte Carlo input sequence, or a Monte Carlo output sequence.