queso-0.53.0
MetropolisHastingsSGOptions.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // QUESO - a library to support the Quantification of Uncertainty
5 // for Estimation, Simulation and Optimization
6 //
7 // Copyright (C) 2008-2015 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 #include <boost/program_options.hpp>
26 
27 #include <queso/Environment.h>
28 #include <queso/MetropolisHastingsSGOptions.h>
29 #include <queso/Miscellaneous.h>
30 
31 // -------------------------------------------------
32 // MhOptionsValues --------------------------
33 // -------------------------------------------------
34 
35 namespace QUESO {
36 
37 // Default constructor -----------------------------
39 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
40  const SsOptionsValues* alternativeRawSsOptionsValues,
41  const SsOptionsValues* alternativeFilteredSsOptionsValues
42 #endif
43  )
44  :
45  m_prefix ("mh_"),
46  m_help(UQ_MH_SG_HELP),
47  m_dataOutputFileName (UQ_MH_SG_DATA_OUTPUT_FILE_NAME_ODV),
48  m_dataOutputAllowAll (UQ_MH_SG_DATA_OUTPUT_ALLOW_ALL_ODV),
49  //m_dataOutputAllowedSet (),
50  m_totallyMute (UQ_MH_SG_TOTALLY_MUTE_ODV),
51  m_initialPositionDataInputFileName (UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_NAME_ODV),
52  m_initialPositionDataInputFileType (UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_TYPE_ODV),
53  m_initialProposalCovMatrixDataInputFileName(UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_NAME_ODV),
54  m_initialProposalCovMatrixDataInputFileType(UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_TYPE_ODV),
55  //m_parameterDisabledSet (),
56  m_rawChainDataInputFileName (UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_NAME_ODV),
57  m_rawChainDataInputFileType (UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_TYPE_ODV),
58  m_rawChainSize (UQ_MH_SG_RAW_CHAIN_SIZE_ODV),
59  m_rawChainGenerateExtra (UQ_MH_SG_RAW_CHAIN_GENERATE_EXTRA_ODV),
60  m_rawChainDisplayPeriod (UQ_MH_SG_RAW_CHAIN_DISPLAY_PERIOD_ODV),
61  m_rawChainMeasureRunTimes (UQ_MH_SG_RAW_CHAIN_MEASURE_RUN_TIMES_ODV),
62  m_rawChainDataOutputPeriod (UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_PERIOD_ODV),
63  m_rawChainDataOutputFileName (UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_NAME_ODV),
64  m_rawChainDataOutputFileType (UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV),
65  m_rawChainDataOutputAllowAll (UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV),
66  //m_rawChainDataOutputAllowedSet (),
67 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
68  m_rawChainComputeStats (UQ_MH_SG_RAW_CHAIN_COMPUTE_STATS_ODV),
69 #endif
70  m_filteredChainGenerate (UQ_MH_SG_FILTERED_CHAIN_GENERATE_ODV),
71  m_filteredChainDiscardedPortion (UQ_MH_SG_FILTERED_CHAIN_DISCARDED_PORTION_ODV),
72  m_filteredChainLag (UQ_MH_SG_FILTERED_CHAIN_LAG_ODV),
73  m_filteredChainDataOutputFileName (UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_NAME_ODV),
74  m_filteredChainDataOutputFileType (UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV),
75  m_filteredChainDataOutputAllowAll (UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV),
76  //m_filteredChainDataOutputAllowedSet (),
77 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
78  m_filteredChainComputeStats (UQ_MH_SG_FILTERED_CHAIN_COMPUTE_STATS_ODV),
79 #endif
80  m_displayCandidates (UQ_MH_SG_DISPLAY_CANDIDATES_ODV),
81  m_putOutOfBoundsInChain (UQ_MH_SG_PUT_OUT_OF_BOUNDS_IN_CHAIN_ODV),
82  m_tkUseLocalHessian (UQ_MH_SG_TK_USE_LOCAL_HESSIAN_ODV),
83  m_tkUseNewtonComponent (UQ_MH_SG_TK_USE_NEWTON_COMPONENT_ODV),
84  m_drMaxNumExtraStages (UQ_MH_SG_DR_MAX_NUM_EXTRA_STAGES_ODV),
85  m_drScalesForExtraStages (0),
86  m_drDuringAmNonAdaptiveInt (UQ_MH_SG_DR_DURING_AM_NON_ADAPTIVE_INT_ODV),
87  m_amKeepInitialMatrix (UQ_MH_SG_AM_KEEP_INITIAL_MATRIX_ODV),
88  m_amInitialNonAdaptInterval (UQ_MH_SG_AM_INIT_NON_ADAPT_INT_ODV),
89  m_amAdaptInterval (UQ_MH_SG_AM_ADAPT_INTERVAL_ODV),
90  m_amAdaptedMatricesDataOutputPeriod (UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_PERIOD_ODV),
91  m_amAdaptedMatricesDataOutputFileName (UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_NAME_ODV),
92  m_amAdaptedMatricesDataOutputFileType (UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_TYPE_ODV),
93  m_amAdaptedMatricesDataOutputAllowAll (UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOW_ALL_ODV),
94  //m_amAdaptedMatricesDataOutputAllowedSet (),
95  m_amEta (UQ_MH_SG_AM_ETA_ODV),
96  m_amEpsilon (UQ_MH_SG_AM_EPSILON_ODV),
97  m_enableBrooksGelmanConvMonitor (UQ_MH_SG_ENABLE_BROOKS_GELMAN_CONV_MONITOR),
98  m_BrooksGelmanLag (UQ_MH_SG_BROOKS_GELMAN_LAG),
99  m_outputLogLikelihood (UQ_MH_SG_OUTPUT_LOG_LIKELIHOOD),
100  m_outputLogTarget (UQ_MH_SG_OUTPUT_LOG_TARGET),
101  m_doLogitTransform (UQ_MH_SG_DO_LOGIT_TRANSFORM),
102 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
103  m_alternativeRawSsOptionsValues (),
104  m_alternativeFilteredSsOptionsValues (),
105 #endif
106  m_parser(NULL),
107  m_option_help (m_prefix + "help" ),
108  m_option_dataOutputFileName (m_prefix + "dataOutputFileName" ),
109  m_option_dataOutputAllowAll (m_prefix + "dataOutputAllowAll" ),
110  m_option_dataOutputAllowedSet (m_prefix + "dataOutputAllowedSet" ),
111  m_option_totallyMute (m_prefix + "totallyMute" ),
112  m_option_initialPosition_dataInputFileName (m_prefix + "initialPosition_dataInputFileName" ),
113  m_option_initialPosition_dataInputFileType (m_prefix + "initialPosition_dataInputFileType" ),
114  m_option_initialProposalCovMatrix_dataInputFileName(m_prefix + "initialProposalCovMatrix_dataInputFileName"),
115  m_option_initialProposalCovMatrix_dataInputFileType(m_prefix + "initialProposalCovMatrix_dataInputFileType"),
116  m_option_listOfDisabledParameters (m_prefix + "listOfDisabledParameters" ),
117  m_option_rawChain_dataInputFileName (m_prefix + "rawChain_dataInputFileName" ),
118  m_option_rawChain_dataInputFileType (m_prefix + "rawChain_dataInputFileType" ),
119  m_option_rawChain_size (m_prefix + "rawChain_size" ),
120  m_option_rawChain_generateExtra (m_prefix + "rawChain_generateExtra" ),
121  m_option_rawChain_displayPeriod (m_prefix + "rawChain_displayPeriod" ),
122  m_option_rawChain_measureRunTimes (m_prefix + "rawChain_measureRunTimes" ),
123  m_option_rawChain_dataOutputPeriod (m_prefix + "rawChain_dataOutputPeriod" ),
124  m_option_rawChain_dataOutputFileName (m_prefix + "rawChain_dataOutputFileName" ),
125  m_option_rawChain_dataOutputFileType (m_prefix + "rawChain_dataOutputFileType" ),
126  m_option_rawChain_dataOutputAllowAll (m_prefix + "rawChain_dataOutputAllowAll" ),
127  m_option_rawChain_dataOutputAllowedSet (m_prefix + "rawChain_dataOutputAllowedSet" ),
128 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
129  m_option_rawChain_computeStats (m_prefix + "rawChain_computeStats" ),
130 #endif
131  m_option_filteredChain_generate (m_prefix + "filteredChain_generate" ),
132  m_option_filteredChain_discardedPortion (m_prefix + "filteredChain_discardedPortion" ),
133  m_option_filteredChain_lag (m_prefix + "filteredChain_lag" ),
134  m_option_filteredChain_dataOutputFileName (m_prefix + "filteredChain_dataOutputFileName" ),
135  m_option_filteredChain_dataOutputFileType (m_prefix + "filteredChain_dataOutputFileType" ),
136  m_option_filteredChain_dataOutputAllowAll (m_prefix + "filteredChain_dataOutputAllowAll" ),
137  m_option_filteredChain_dataOutputAllowedSet (m_prefix + "filteredChain_dataOutputAllowedSet" ),
138 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
139  m_option_filteredChain_computeStats (m_prefix + "filteredChain_computeStats" ),
140 #endif
141  m_option_displayCandidates (m_prefix + "displayCandidates" ),
142  m_option_putOutOfBoundsInChain (m_prefix + "putOutOfBoundsInChain" ),
143  m_option_tk_useLocalHessian (m_prefix + "tk_useLocalHessian" ),
144  m_option_tk_useNewtonComponent (m_prefix + "tk_useNewtonComponent" ),
145  m_option_dr_maxNumExtraStages (m_prefix + "dr_maxNumExtraStages" ),
146  m_option_dr_listOfScalesForExtraStages (m_prefix + "dr_listOfScalesForExtraStages" ),
147  m_option_dr_duringAmNonAdaptiveInt (m_prefix + "dr_duringAmNonAdaptiveInt" ),
148  m_option_am_keepInitialMatrix (m_prefix + "am_keepInitialMatrix" ),
149  m_option_am_initialNonAdaptInterval (m_prefix + "am_initialNonAdaptInterval" ),
150  m_option_am_adaptInterval (m_prefix + "am_adaptInterval" ),
151  m_option_am_adaptedMatrices_dataOutputPeriod (m_prefix + "am_adaptedMatrices_dataOutputPeriod" ),
152  m_option_am_adaptedMatrices_dataOutputFileName (m_prefix + "am_adaptedMatrices_dataOutputFileName" ),
153  m_option_am_adaptedMatrices_dataOutputFileType (m_prefix + "am_adaptedMatrices_dataOutputFileType" ),
154  m_option_am_adaptedMatrices_dataOutputAllowAll (m_prefix + "am_adaptedMatrices_dataOutputAllowAll" ),
155  m_option_am_adaptedMatrices_dataOutputAllowedSet (m_prefix + "am_adaptedMatrices_dataOutputAllowedSet" ),
156  m_option_am_eta (m_prefix + "am_eta" ),
157  m_option_am_epsilon (m_prefix + "am_epsilon" ),
158  m_option_enableBrooksGelmanConvMonitor (m_prefix + "enableBrooksGelmanConvMonitor" ),
159  m_option_BrooksGelmanLag (m_prefix + "BrooksGelmanLag" ),
160  m_option_outputLogLikelihood (m_prefix + "outputLogLikelihood" ),
161  m_option_outputLogTarget (m_prefix + "outputLogTarget" ),
162  m_option_doLogitTransform (m_prefix + "doLogitTransform" )
163 {
164 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
165  if (alternativeRawSsOptionsValues ) m_alternativeRawSsOptionsValues = *alternativeRawSsOptionsValues;
166  if (alternativeFilteredSsOptionsValues) m_alternativeFilteredSsOptionsValues = *alternativeFilteredSsOptionsValues;
167 #endif
168 }
169 
171 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
172  const SsOptionsValues* alternativeRawSsOptionsValues,
173  const SsOptionsValues* alternativeFilteredSsOptionsValues,
174 #endif
175  const BaseEnvironment * env,
176  const char * prefix
177  )
178  :
179  m_prefix ((std::string)(prefix) + "mh_"),
180  m_help(UQ_MH_SG_HELP),
181  m_dataOutputFileName (UQ_MH_SG_DATA_OUTPUT_FILE_NAME_ODV),
182  m_dataOutputAllowAll (UQ_MH_SG_DATA_OUTPUT_ALLOW_ALL_ODV),
183  //m_dataOutputAllowedSet (),
184  m_totallyMute (UQ_MH_SG_TOTALLY_MUTE_ODV),
185  m_initialPositionDataInputFileName (UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_NAME_ODV),
186  m_initialPositionDataInputFileType (UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_TYPE_ODV),
187  m_initialProposalCovMatrixDataInputFileName(UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_NAME_ODV),
188  m_initialProposalCovMatrixDataInputFileType(UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_TYPE_ODV),
189  //m_parameterDisabledSet (),
190  m_rawChainDataInputFileName (UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_NAME_ODV),
191  m_rawChainDataInputFileType (UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_TYPE_ODV),
192  m_rawChainSize (UQ_MH_SG_RAW_CHAIN_SIZE_ODV),
193  m_rawChainGenerateExtra (UQ_MH_SG_RAW_CHAIN_GENERATE_EXTRA_ODV),
194  m_rawChainDisplayPeriod (UQ_MH_SG_RAW_CHAIN_DISPLAY_PERIOD_ODV),
195  m_rawChainMeasureRunTimes (UQ_MH_SG_RAW_CHAIN_MEASURE_RUN_TIMES_ODV),
196  m_rawChainDataOutputPeriod (UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_PERIOD_ODV),
197  m_rawChainDataOutputFileName (UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_NAME_ODV),
198  m_rawChainDataOutputFileType (UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV),
199  m_rawChainDataOutputAllowAll (UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV),
200  //m_rawChainDataOutputAllowedSet (),
201 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
202  m_rawChainComputeStats (UQ_MH_SG_RAW_CHAIN_COMPUTE_STATS_ODV),
203 #endif
204  m_filteredChainGenerate (UQ_MH_SG_FILTERED_CHAIN_GENERATE_ODV),
205  m_filteredChainDiscardedPortion (UQ_MH_SG_FILTERED_CHAIN_DISCARDED_PORTION_ODV),
206  m_filteredChainLag (UQ_MH_SG_FILTERED_CHAIN_LAG_ODV),
207  m_filteredChainDataOutputFileName (UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_NAME_ODV),
208  m_filteredChainDataOutputFileType (UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV),
209  m_filteredChainDataOutputAllowAll (UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV),
210  //m_filteredChainDataOutputAllowedSet (),
211 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
212  m_filteredChainComputeStats (UQ_MH_SG_FILTERED_CHAIN_COMPUTE_STATS_ODV),
213 #endif
214  m_displayCandidates (UQ_MH_SG_DISPLAY_CANDIDATES_ODV),
215  m_putOutOfBoundsInChain (UQ_MH_SG_PUT_OUT_OF_BOUNDS_IN_CHAIN_ODV),
216  m_tkUseLocalHessian (UQ_MH_SG_TK_USE_LOCAL_HESSIAN_ODV),
217  m_tkUseNewtonComponent (UQ_MH_SG_TK_USE_NEWTON_COMPONENT_ODV),
218  m_drMaxNumExtraStages (UQ_MH_SG_DR_MAX_NUM_EXTRA_STAGES_ODV),
219  m_drScalesForExtraStages (0),
220  m_drDuringAmNonAdaptiveInt (UQ_MH_SG_DR_DURING_AM_NON_ADAPTIVE_INT_ODV),
221  m_amKeepInitialMatrix (UQ_MH_SG_AM_KEEP_INITIAL_MATRIX_ODV),
222  m_amInitialNonAdaptInterval (UQ_MH_SG_AM_INIT_NON_ADAPT_INT_ODV),
223  m_amAdaptInterval (UQ_MH_SG_AM_ADAPT_INTERVAL_ODV),
224  m_amAdaptedMatricesDataOutputPeriod (UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_PERIOD_ODV),
225  m_amAdaptedMatricesDataOutputFileName (UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_NAME_ODV),
226  m_amAdaptedMatricesDataOutputFileType (UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_TYPE_ODV),
227  m_amAdaptedMatricesDataOutputAllowAll (UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOW_ALL_ODV),
228  //m_amAdaptedMatricesDataOutputAllowedSet (),
229  m_amEta (UQ_MH_SG_AM_ETA_ODV),
230  m_amEpsilon (UQ_MH_SG_AM_EPSILON_ODV),
231  m_enableBrooksGelmanConvMonitor (UQ_MH_SG_ENABLE_BROOKS_GELMAN_CONV_MONITOR),
232  m_BrooksGelmanLag (UQ_MH_SG_BROOKS_GELMAN_LAG),
233  m_outputLogLikelihood (UQ_MH_SG_OUTPUT_LOG_LIKELIHOOD),
234  m_outputLogTarget (UQ_MH_SG_OUTPUT_LOG_TARGET),
235  m_doLogitTransform (UQ_MH_SG_DO_LOGIT_TRANSFORM),
236 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
237  m_alternativeRawSsOptionsValues (),
238  m_alternativeFilteredSsOptionsValues (),
239 #endif
240  m_parser(new BoostInputOptionsParser(env->optionsInputFileName())),
241  m_option_help (m_prefix + "help" ),
242  m_option_dataOutputFileName (m_prefix + "dataOutputFileName" ),
243  m_option_dataOutputAllowAll (m_prefix + "dataOutputAllowAll" ),
244  m_option_dataOutputAllowedSet (m_prefix + "dataOutputAllowedSet" ),
245  m_option_totallyMute (m_prefix + "totallyMute" ),
246  m_option_initialPosition_dataInputFileName (m_prefix + "initialPosition_dataInputFileName" ),
247  m_option_initialPosition_dataInputFileType (m_prefix + "initialPosition_dataInputFileType" ),
248  m_option_initialProposalCovMatrix_dataInputFileName(m_prefix + "initialProposalCovMatrix_dataInputFileName"),
249  m_option_initialProposalCovMatrix_dataInputFileType(m_prefix + "initialProposalCovMatrix_dataInputFileType"),
250  m_option_listOfDisabledParameters (m_prefix + "listOfDisabledParameters" ),
251  m_option_rawChain_dataInputFileName (m_prefix + "rawChain_dataInputFileName" ),
252  m_option_rawChain_dataInputFileType (m_prefix + "rawChain_dataInputFileType" ),
253  m_option_rawChain_size (m_prefix + "rawChain_size" ),
254  m_option_rawChain_generateExtra (m_prefix + "rawChain_generateExtra" ),
255  m_option_rawChain_displayPeriod (m_prefix + "rawChain_displayPeriod" ),
256  m_option_rawChain_measureRunTimes (m_prefix + "rawChain_measureRunTimes" ),
257  m_option_rawChain_dataOutputPeriod (m_prefix + "rawChain_dataOutputPeriod" ),
258  m_option_rawChain_dataOutputFileName (m_prefix + "rawChain_dataOutputFileName" ),
259  m_option_rawChain_dataOutputFileType (m_prefix + "rawChain_dataOutputFileType" ),
260  m_option_rawChain_dataOutputAllowAll (m_prefix + "rawChain_dataOutputAllowAll" ),
261  m_option_rawChain_dataOutputAllowedSet (m_prefix + "rawChain_dataOutputAllowedSet" ),
262 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
263  m_option_rawChain_computeStats (m_prefix + "rawChain_computeStats" ),
264 #endif
265  m_option_filteredChain_generate (m_prefix + "filteredChain_generate" ),
266  m_option_filteredChain_discardedPortion (m_prefix + "filteredChain_discardedPortion" ),
267  m_option_filteredChain_lag (m_prefix + "filteredChain_lag" ),
268  m_option_filteredChain_dataOutputFileName (m_prefix + "filteredChain_dataOutputFileName" ),
269  m_option_filteredChain_dataOutputFileType (m_prefix + "filteredChain_dataOutputFileType" ),
270  m_option_filteredChain_dataOutputAllowAll (m_prefix + "filteredChain_dataOutputAllowAll" ),
271  m_option_filteredChain_dataOutputAllowedSet (m_prefix + "filteredChain_dataOutputAllowedSet" ),
272 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
273  m_option_filteredChain_computeStats (m_prefix + "filteredChain_computeStats" ),
274 #endif
275  m_option_displayCandidates (m_prefix + "displayCandidates" ),
276  m_option_putOutOfBoundsInChain (m_prefix + "putOutOfBoundsInChain" ),
277  m_option_tk_useLocalHessian (m_prefix + "tk_useLocalHessian" ),
278  m_option_tk_useNewtonComponent (m_prefix + "tk_useNewtonComponent" ),
279  m_option_dr_maxNumExtraStages (m_prefix + "dr_maxNumExtraStages" ),
280  m_option_dr_listOfScalesForExtraStages (m_prefix + "dr_listOfScalesForExtraStages" ),
281  m_option_dr_duringAmNonAdaptiveInt (m_prefix + "dr_duringAmNonAdaptiveInt" ),
282  m_option_am_keepInitialMatrix (m_prefix + "am_keepInitialMatrix" ),
283  m_option_am_initialNonAdaptInterval (m_prefix + "am_initialNonAdaptInterval" ),
284  m_option_am_adaptInterval (m_prefix + "am_adaptInterval" ),
285  m_option_am_adaptedMatrices_dataOutputPeriod (m_prefix + "am_adaptedMatrices_dataOutputPeriod" ),
286  m_option_am_adaptedMatrices_dataOutputFileName (m_prefix + "am_adaptedMatrices_dataOutputFileName" ),
287  m_option_am_adaptedMatrices_dataOutputFileType (m_prefix + "am_adaptedMatrices_dataOutputFileType" ),
288  m_option_am_adaptedMatrices_dataOutputAllowAll (m_prefix + "am_adaptedMatrices_dataOutputAllowAll" ),
289  m_option_am_adaptedMatrices_dataOutputAllowedSet (m_prefix + "am_adaptedMatrices_dataOutputAllowedSet" ),
290  m_option_am_eta (m_prefix + "am_eta" ),
291  m_option_am_epsilon (m_prefix + "am_epsilon" ),
292  m_option_enableBrooksGelmanConvMonitor (m_prefix + "enableBrooksGelmanConvMonitor" ),
293  m_option_BrooksGelmanLag (m_prefix + "BrooksGelmanLag" ),
294  m_option_outputLogLikelihood (m_prefix + "outputLogLikelihood" ),
295  m_option_outputLogTarget (m_prefix + "outputLogTarget" ),
296  m_option_doLogitTransform (m_prefix + "doLogitTransform" )
297 {
298 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
299  if (alternativeRawSsOptionsValues ) m_alternativeRawSsOptionsValues = *alternativeRawSsOptionsValues;
300  if (alternativeFilteredSsOptionsValues) m_alternativeFilteredSsOptionsValues = *alternativeFilteredSsOptionsValues;
301 #endif
302 
303  m_parser->registerOption<std::string >(m_option_help, UQ_MH_SG_HELP, "produce help msg for Bayesian Metropolis-Hastings" );
304  m_parser->registerOption<std::string >(m_option_dataOutputFileName, UQ_MH_SG_DATA_OUTPUT_FILE_NAME_ODV , "name of generic output file" );
305  m_parser->registerOption<bool >(m_option_dataOutputAllowAll, UQ_MH_SG_DATA_OUTPUT_ALLOW_ALL_ODV , "allow all subEnvs write to a generic output file" );
306  m_parser->registerOption<std::string >(m_option_dataOutputAllowedSet, UQ_MH_SG_DATA_OUTPUT_ALLOWED_SET_ODV , "subEnvs that will write to generic output file" );
307  m_parser->registerOption<bool >(m_option_totallyMute, UQ_MH_SG_TOTALLY_MUTE_ODV , "totally mute (no printout msg)" );
313  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 " );
314  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 " );
315  m_parser->registerOption<unsigned int>(m_option_rawChain_size, UQ_MH_SG_RAW_CHAIN_SIZE_ODV , "size of raw chain" );
316  m_parser->registerOption<bool >(m_option_rawChain_generateExtra, UQ_MH_SG_RAW_CHAIN_GENERATE_EXTRA_ODV , "generate extra information about raw chain" );
317  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" );
319  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" );
320  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 " );
321  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 " );
322  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" );
323  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" );
324 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
325  m_parser->registerOption<bool >(m_option_rawChain_computeStats, UQ_MH_SG_RAW_CHAIN_COMPUTE_STATS_ODV , "compute statistics on raw chain" );
326 #endif
328  m_parser->registerOption<double >(m_option_filteredChain_discardedPortion, UQ_MH_SG_FILTERED_CHAIN_DISCARDED_PORTION_ODV , "initial discarded portion for chain filtering" );
329  m_parser->registerOption<unsigned int>(m_option_filteredChain_lag, UQ_MH_SG_FILTERED_CHAIN_LAG_ODV , "spacing for chain filtering" );
332  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" );
333  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" );
334 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
335  m_parser->registerOption<bool >(m_option_filteredChain_computeStats, UQ_MH_SG_FILTERED_CHAIN_COMPUTE_STATS_ODV , "compute statistics on filtered chain" );
336 #endif
337  m_parser->registerOption<bool >(m_option_displayCandidates, UQ_MH_SG_DISPLAY_CANDIDATES_ODV , "display candidates in the core MH algorithm" );
338  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" );
339  m_parser->registerOption<bool >(m_option_tk_useLocalHessian, UQ_MH_SG_TK_USE_LOCAL_HESSIAN_ODV , "'proposal' use local Hessian" );
341  m_parser->registerOption<unsigned int>(m_option_dr_maxNumExtraStages, UQ_MH_SG_DR_MAX_NUM_EXTRA_STAGES_ODV , "'dr' maximum number of extra stages" );
342  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" );
343  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" );
344  m_parser->registerOption<bool >(m_option_am_keepInitialMatrix, UQ_MH_SG_AM_KEEP_INITIAL_MATRIX_ODV , "'am' keep initial (given) matrix" );
345  m_parser->registerOption<unsigned int>(m_option_am_initialNonAdaptInterval, UQ_MH_SG_AM_INIT_NON_ADAPT_INT_ODV , "'am' initial non adaptation interval" );
346  m_parser->registerOption<unsigned int>(m_option_am_adaptInterval, UQ_MH_SG_AM_ADAPT_INTERVAL_ODV , "'am' adaptation interval" );
354  m_parser->registerOption<unsigned int>(m_option_enableBrooksGelmanConvMonitor, UQ_MH_SG_ENABLE_BROOKS_GELMAN_CONV_MONITOR , "assess convergence using Brooks-Gelman metric" );
355  m_parser->registerOption<unsigned int>(m_option_BrooksGelmanLag, UQ_MH_SG_BROOKS_GELMAN_LAG , "number of chain positions before starting to compute metric");
356  m_parser->registerOption<bool >(m_option_outputLogLikelihood, UQ_MH_SG_OUTPUT_LOG_LIKELIHOOD , "flag to toggle output of log likelihood values" );
357  m_parser->registerOption<bool >(m_option_outputLogTarget, UQ_MH_SG_OUTPUT_LOG_TARGET , "flag to toggle output of log target values" );
358  m_parser->registerOption<bool >(m_option_doLogitTransform, UQ_MH_SG_DO_LOGIT_TRANSFORM , "flag to toggle logit transform for bounded domains" );
359 
361 
362  m_parser->getOption<std::string >(m_option_help, m_help);
383 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
384  m_parser->getOption<bool >(m_option_rawChain_computeStats, m_rawChain_computeStats);
385 #endif
393 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
394  m_parser->getOption<bool >(m_option_filteredChain_computeStats, m_filteredChain_computeStats);
395 #endif
418 
419  checkOptions(env);
420 }
421 // Copy constructor----------------------------------
423 {
424  this->copy(src);
425 }
426 // Destructor ---------------------------------------
428 {
429 }
430 // Set methods --------------------------------------
433 {
434  this->copy(rhs);
435  return *this;
436 }
437 // Private methods-----------------------------------
438 void
440 {
441  if (m_dataOutputAllowAll) {
442  // So, ignore the 'set' option
443  m_dataOutputAllowedSet.clear();
444  m_dataOutputAllowedSet.insert(env->subId());
445  }
446 
448  // Again, ignore the set
450  m_rawChainDataOutputAllowedSet.insert(env->subId());
451  }
452 
453  if (m_filteredChainGenerate == true) {
454  queso_require_greater_equal_msg(m_filteredChainLag, 2, "option `" << m_option_filteredChain_lag << "` must be at least 2");
455  }
456 
460  }
461 
462  // If max is bigger than the list provided, then pad with ones
463  if (m_drMaxNumExtraStages > 0) {
464  unsigned int size = m_drScalesForExtraStages.size();
465  if (m_drMaxNumExtraStages > size) {
466  for (unsigned int i = size; i < m_drMaxNumExtraStages; i++) {
467  double scale = 1.0;
468  m_drScalesForExtraStages.push_back(scale);
469  }
470  }
471  }
472  else {
473  m_drScalesForExtraStages.clear();
474  }
475 
479  }
480 }
481 
482 void
484 {
505 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
506  m_rawChainComputeStats = src.m_rawChainComputeStats;
507 #endif
508 //m_rawChainStatisticalOptionsObj = src.m_rawChainStatisticalOptionsObj; // dakota
509 //m_rawChainStatOptsInstantiated = src.m_rawChainStatOptsInstantiated; // dakota
517 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
518  m_filteredChainComputeStats = src.m_filteredChainComputeStats;
519 #endif
520 //m_filteredChainStatisticalOptionsObj = src.m_filteredChainStatisticalOptionsObj; // dakota
521 //m_filteredChainStatOptsInstantiated = src.m_filteredChainStatOptsInstantiated; // dakota
537  m_amEta = src.m_amEta;
538  m_amEpsilon = src.m_amEpsilon;
544 
545 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
546  m_alternativeRawSsOptionsValues = src.m_alternativeRawSsOptionsValues;
547  m_alternativeFilteredSsOptionsValues = src.m_alternativeFilteredSsOptionsValues;
548 #endif
549  return;
550 }
551 
552 std::ostream & operator<<(std::ostream & os, const MhOptionsValues & obj)
553 {
554  os << (*(obj.m_parser)) << std::endl;
555 
556  os << obj.m_option_dataOutputFileName << " = " << obj.m_dataOutputFileName
557  << "\n" << obj.m_option_dataOutputAllowAll << " = " << obj.m_dataOutputAllowAll
558  << "\n" << obj.m_option_dataOutputAllowedSet << " = ";
559  for (std::set<unsigned int>::iterator setIt = obj.m_dataOutputAllowedSet.begin(); setIt != obj.m_dataOutputAllowedSet.end(); ++setIt) {
560  os << *setIt << " ";
561  }
562  os << "\n" << obj.m_option_totallyMute << " = " << obj.m_totallyMute
567  << "\n" << obj.m_option_listOfDisabledParameters << " = ";
568  for (std::set<unsigned int>::iterator setIt = obj.m_parameterDisabledSet.begin(); setIt != obj.m_parameterDisabledSet.end(); ++setIt) {
569  os << *setIt << " ";
570  }
571  os << "\n" << obj.m_option_rawChain_dataInputFileName << " = " << obj.m_rawChainDataInputFileName
573  << "\n" << obj.m_option_rawChain_size << " = " << obj.m_rawChainSize
574  << "\n" << obj.m_option_rawChain_generateExtra << " = " << obj.m_rawChainGenerateExtra
575  << "\n" << obj.m_option_rawChain_displayPeriod << " = " << obj.m_rawChainDisplayPeriod
576  << "\n" << obj.m_option_rawChain_measureRunTimes << " = " << obj.m_rawChainMeasureRunTimes
581  << "\n" << obj.m_option_rawChain_dataOutputAllowedSet << " = ";
582  for (std::set<unsigned int>::iterator setIt = obj.m_rawChainDataOutputAllowedSet.begin(); setIt != obj.m_rawChainDataOutputAllowedSet.end(); ++setIt) {
583  os << *setIt << " ";
584  }
585  os
586 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
587  << "\n" << obj.m_option_rawChain_computeStats << " = " << obj.m_rawChainComputeStats
588 #endif
589  << "\n" << obj.m_option_filteredChain_generate << " = " << obj.m_filteredChainGenerate
591  << "\n" << obj.m_option_filteredChain_lag << " = " << obj.m_filteredChainLag
595  << "\n" << obj.m_option_filteredChain_dataOutputAllowedSet << " = ";
596  for (std::set<unsigned int>::iterator setIt = obj.m_filteredChainDataOutputAllowedSet.begin(); setIt != obj.m_filteredChainDataOutputAllowedSet.end(); ++setIt) {
597  os << *setIt << " ";
598  }
599  os
600 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
601  << "\n" << obj.m_option_filteredChain_computeStats << " = " << obj.m_filteredChainComputeStats
602 #endif
603  << "\n" << obj.m_option_displayCandidates << " = " << obj.m_displayCandidates
604  << "\n" << obj.m_option_putOutOfBoundsInChain << " = " << obj.m_putOutOfBoundsInChain
605  << "\n" << obj.m_option_tk_useLocalHessian << " = " << obj.m_tkUseLocalHessian
606  << "\n" << obj.m_option_tk_useNewtonComponent << " = " << obj.m_tkUseNewtonComponent
607  << "\n" << obj.m_option_dr_maxNumExtraStages << " = " << obj.m_drMaxNumExtraStages
608  << "\n" << obj.m_option_dr_listOfScalesForExtraStages << " = ";
609  for (unsigned int i = 0; i < obj.m_drScalesForExtraStages.size(); ++i) {
610  os << obj.m_drScalesForExtraStages[i] << " ";
611  }
612  os << "\n" << obj.m_option_dr_duringAmNonAdaptiveInt << " = " << obj.m_drDuringAmNonAdaptiveInt
613  << "\n" << obj.m_option_am_keepInitialMatrix << " = " << obj.m_amKeepInitialMatrix
615  << "\n" << obj.m_option_am_adaptInterval << " = " << obj.m_amAdaptInterval
620  << "\n" << obj.m_option_am_adaptedMatrices_dataOutputAllowedSet << " = ";
621  for (std::set<unsigned int>::iterator setIt = obj.m_amAdaptedMatricesDataOutputAllowedSet.begin(); setIt != obj.m_amAdaptedMatricesDataOutputAllowedSet.end(); ++setIt) {
622  os << *setIt << " ";
623  }
624  os << "\n" << obj.m_option_am_eta << " = " << obj.m_amEta
625  << "\n" << obj.m_option_am_epsilon << " = " << obj.m_amEpsilon
627  << "\n" << obj.m_option_BrooksGelmanLag << " = " << obj.m_BrooksGelmanLag
628  << "\n" << obj.m_option_outputLogLikelihood << " = " << obj.m_outputLogLikelihood
629  << "\n" << obj.m_option_outputLogTarget << " = " << obj.m_outputLogTarget
630  << "\n" << obj.m_option_doLogitTransform << " = " << obj.m_doLogitTransform
631  << std::endl;
632 
633  return os;
634 }
635 
636 //---------------------------------------------------
637 // MetropolisHastingsSGOptions ---------------
638 //---------------------------------------------------
639 
640 // Default constructor -----------------------------
642  const BaseEnvironment& env,
643  const char* prefix)
644  :
645 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
646  m_ov (NULL,NULL), // dakota
647  m_rawChainStatisticalOptionsObj (NULL),
648  m_rawChainStatOptsInstantiated (false),
649  m_filteredChainStatisticalOptionsObj (NULL),
650  m_filteredChainStatOptsInstantiated (false),
651 #else
652  m_ov (),
653 #endif
654  m_prefix ((std::string)(prefix) + "mh_"),
655  m_env (env),
656  m_optionsDesc (new boost::program_options::options_description("Bayesian Metropolis-Hastings options")),
657  m_option_help (m_prefix + "help" ),
658  m_option_dataOutputFileName (m_prefix + "dataOutputFileName" ),
659  m_option_dataOutputAllowAll (m_prefix + "dataOutputAllowAll" ),
660  m_option_dataOutputAllowedSet (m_prefix + "dataOutputAllowedSet" ),
661  m_option_totallyMute (m_prefix + "totallyMute" ),
662  m_option_initialPosition_dataInputFileName (m_prefix + "initialPosition_dataInputFileName" ),
663  m_option_initialPosition_dataInputFileType (m_prefix + "initialPosition_dataInputFileType" ),
664  m_option_initialProposalCovMatrix_dataInputFileName(m_prefix + "initialProposalCovMatrix_dataInputFileName"),
665  m_option_initialProposalCovMatrix_dataInputFileType(m_prefix + "initialProposalCovMatrix_dataInputFileType"),
666  m_option_listOfDisabledParameters (m_prefix + "listOfDisabledParameters" ),
667  m_option_rawChain_dataInputFileName (m_prefix + "rawChain_dataInputFileName" ),
668  m_option_rawChain_dataInputFileType (m_prefix + "rawChain_dataInputFileType" ),
669  m_option_rawChain_size (m_prefix + "rawChain_size" ),
670  m_option_rawChain_generateExtra (m_prefix + "rawChain_generateExtra" ),
671  m_option_rawChain_displayPeriod (m_prefix + "rawChain_displayPeriod" ),
672  m_option_rawChain_measureRunTimes (m_prefix + "rawChain_measureRunTimes" ),
673  m_option_rawChain_dataOutputPeriod (m_prefix + "rawChain_dataOutputPeriod" ),
674  m_option_rawChain_dataOutputFileName (m_prefix + "rawChain_dataOutputFileName" ),
675  m_option_rawChain_dataOutputFileType (m_prefix + "rawChain_dataOutputFileType" ),
676  m_option_rawChain_dataOutputAllowAll (m_prefix + "rawChain_dataOutputAllowAll" ),
677  m_option_rawChain_dataOutputAllowedSet (m_prefix + "rawChain_dataOutputAllowedSet" ),
678 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
679  m_option_rawChain_computeStats (m_prefix + "rawChain_computeStats" ),
680 #endif
681  m_option_filteredChain_generate (m_prefix + "filteredChain_generate" ),
682  m_option_filteredChain_discardedPortion (m_prefix + "filteredChain_discardedPortion" ),
683  m_option_filteredChain_lag (m_prefix + "filteredChain_lag" ),
684  m_option_filteredChain_dataOutputFileName (m_prefix + "filteredChain_dataOutputFileName" ),
685  m_option_filteredChain_dataOutputFileType (m_prefix + "filteredChain_dataOutputFileType" ),
686  m_option_filteredChain_dataOutputAllowAll (m_prefix + "filteredChain_dataOutputAllowAll" ),
687  m_option_filteredChain_dataOutputAllowedSet (m_prefix + "filteredChain_dataOutputAllowedSet" ),
688 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
689  m_option_filteredChain_computeStats (m_prefix + "filteredChain_computeStats" ),
690 #endif
691  m_option_displayCandidates (m_prefix + "displayCandidates" ),
692  m_option_putOutOfBoundsInChain (m_prefix + "putOutOfBoundsInChain" ),
693  m_option_tk_useLocalHessian (m_prefix + "tk_useLocalHessian" ),
694  m_option_tk_useNewtonComponent (m_prefix + "tk_useNewtonComponent" ),
695  m_option_dr_maxNumExtraStages (m_prefix + "dr_maxNumExtraStages" ),
696  m_option_dr_listOfScalesForExtraStages (m_prefix + "dr_listOfScalesForExtraStages" ),
697  m_option_dr_duringAmNonAdaptiveInt (m_prefix + "dr_duringAmNonAdaptiveInt" ),
698  m_option_am_keepInitialMatrix (m_prefix + "am_keepInitialMatrix" ),
699  m_option_am_initialNonAdaptInterval (m_prefix + "am_initialNonAdaptInterval" ),
700  m_option_am_adaptInterval (m_prefix + "am_adaptInterval" ),
701  m_option_am_adaptedMatrices_dataOutputPeriod (m_prefix + "am_adaptedMatrices_dataOutputPeriod" ),
702  m_option_am_adaptedMatrices_dataOutputFileName (m_prefix + "am_adaptedMatrices_dataOutputFileName" ),
703  m_option_am_adaptedMatrices_dataOutputFileType (m_prefix + "am_adaptedMatrices_dataOutputFileType" ),
704  m_option_am_adaptedMatrices_dataOutputAllowAll (m_prefix + "am_adaptedMatrices_dataOutputAllowAll" ),
705  m_option_am_adaptedMatrices_dataOutputAllowedSet (m_prefix + "am_adaptedMatrices_dataOutputAllowedSet" ),
706  m_option_am_eta (m_prefix + "am_eta" ),
707  m_option_am_epsilon (m_prefix + "am_epsilon" ),
708  m_option_enableBrooksGelmanConvMonitor (m_prefix + "enableBrooksGelmanConvMonitor" ),
709  m_option_BrooksGelmanLag (m_prefix + "BrooksGelmanLag" ),
710  m_option_outputLogLikelihood (m_prefix + "outputLogLikelihood" ),
711  m_option_outputLogTarget (m_prefix + "outputLogTarget" ),
712  m_option_doLogitTransform (m_prefix + "doLogitTransform" )
713 {
715 
716  queso_require_not_equal_to_msg(m_env.optionsInputFileName(), "", "this constructor is incompatible with the absence of an options input file");
717 }
718 // Constructor 2------------------------------------
720  const BaseEnvironment& env,
721  const char* prefix,
722  const MhOptionsValues& alternativeOptionsValues)
723  :
724  m_ov (alternativeOptionsValues),
725 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
726  m_rawChainStatisticalOptionsObj (NULL),
727  m_rawChainStatOptsInstantiated (false),
728  m_filteredChainStatisticalOptionsObj (NULL),
729  m_filteredChainStatOptsInstantiated (false),
730 #endif
731  m_prefix ((std::string)(prefix) + "mh_"),
732  m_env (env),
733  m_optionsDesc (NULL),
734  m_option_help (m_prefix + "help" ),
735  m_option_dataOutputFileName (m_prefix + "dataOutputFileName" ),
736  m_option_dataOutputAllowAll (m_prefix + "dataOutputAllowAll" ),
737  m_option_dataOutputAllowedSet (m_prefix + "dataOutputAllowedSet" ),
738  m_option_totallyMute (m_prefix + "totallyMute" ),
739  m_option_initialPosition_dataInputFileName (m_prefix + "initialPosition_dataInputFileName" ),
740  m_option_initialPosition_dataInputFileType (m_prefix + "initialPosition_dataInputFileType" ),
741  m_option_initialProposalCovMatrix_dataInputFileName(m_prefix + "initialProposalCovMatrix_dataInputFileName"),
742  m_option_initialProposalCovMatrix_dataInputFileType(m_prefix + "initialProposalCovMatrix_dataInputFileType"),
743  m_option_listOfDisabledParameters (m_prefix + "listOfDisabledParameters" ),
744  m_option_rawChain_dataInputFileName (m_prefix + "rawChain_dataInputFileName" ),
745  m_option_rawChain_dataInputFileType (m_prefix + "rawChain_dataInputFileType" ),
746  m_option_rawChain_size (m_prefix + "rawChain_size" ),
747  m_option_rawChain_generateExtra (m_prefix + "rawChain_generateExtra" ),
748  m_option_rawChain_displayPeriod (m_prefix + "rawChain_displayPeriod" ),
749  m_option_rawChain_measureRunTimes (m_prefix + "rawChain_measureRunTimes" ),
750  m_option_rawChain_dataOutputPeriod (m_prefix + "rawChain_dataOutputPeriod" ),
751  m_option_rawChain_dataOutputFileName (m_prefix + "rawChain_dataOutputFileName" ),
752  m_option_rawChain_dataOutputFileType (m_prefix + "rawChain_dataOutputFileType" ),
753  m_option_rawChain_dataOutputAllowAll (m_prefix + "rawChain_dataOutputAllowAll" ),
754  m_option_rawChain_dataOutputAllowedSet (m_prefix + "rawChain_dataOutputAllowedSet" ),
755 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
756  m_option_rawChain_computeStats (m_prefix + "rawChain_computeStats" ),
757 #endif
758  m_option_filteredChain_generate (m_prefix + "filteredChain_generate" ),
759  m_option_filteredChain_discardedPortion (m_prefix + "filteredChain_discardedPortion" ),
760  m_option_filteredChain_lag (m_prefix + "filteredChain_lag" ),
761  m_option_filteredChain_dataOutputFileName (m_prefix + "filteredChain_dataOutputFileName" ),
762  m_option_filteredChain_dataOutputFileType (m_prefix + "filteredChain_dataOutputFileType" ),
763  m_option_filteredChain_dataOutputAllowAll (m_prefix + "filteredChain_dataOutputAllowAll" ),
764  m_option_filteredChain_dataOutputAllowedSet (m_prefix + "filteredChain_dataOutputAllowedSet" ),
765 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
766  m_option_filteredChain_computeStats (m_prefix + "filteredChain_computeStats" ),
767 #endif
768  m_option_displayCandidates (m_prefix + "displayCandidates" ),
769  m_option_putOutOfBoundsInChain (m_prefix + "putOutOfBoundsInChain" ),
770  m_option_tk_useLocalHessian (m_prefix + "tk_useLocalHessian" ),
771  m_option_tk_useNewtonComponent (m_prefix + "tk_useNewtonComponent" ),
772  m_option_dr_maxNumExtraStages (m_prefix + "dr_maxNumExtraStages" ),
773  m_option_dr_listOfScalesForExtraStages (m_prefix + "dr_listOfScalesForExtraStages" ),
774  m_option_dr_duringAmNonAdaptiveInt (m_prefix + "dr_duringAmNonAdaptiveInt" ),
775  m_option_am_keepInitialMatrix (m_prefix + "am_keepInitialMatrix" ),
776  m_option_am_initialNonAdaptInterval (m_prefix + "am_initialNonAdaptInterval" ),
777  m_option_am_adaptInterval (m_prefix + "am_adaptInterval" ),
778  m_option_am_adaptedMatrices_dataOutputPeriod (m_prefix + "am_adaptedMatrices_dataOutputPeriod" ),
779  m_option_am_adaptedMatrices_dataOutputFileName (m_prefix + "am_adaptedMatrices_dataOutputFileName" ),
780  m_option_am_adaptedMatrices_dataOutputFileType (m_prefix + "am_adaptedMatrices_dataOutputFileType" ),
781  m_option_am_adaptedMatrices_dataOutputAllowAll (m_prefix + "am_adaptedMatrices_dataOutputAllowAll" ),
782  m_option_am_adaptedMatrices_dataOutputAllowedSet (m_prefix + "am_adaptedMatrices_dataOutputAllowedSet" ),
783  m_option_am_eta (m_prefix + "am_eta" ),
784  m_option_am_epsilon (m_prefix + "am_epsilon" ),
785  m_option_enableBrooksGelmanConvMonitor (m_prefix + "enableBrooksGelmanConvMonitor" ),
786  m_option_BrooksGelmanLag (m_prefix + "BrooksGelmanLag" ),
787  m_option_outputLogLikelihood (m_prefix + "outputLogLikelihood" ),
788  m_option_outputLogTarget (m_prefix + "outputLogTarget" ),
789  m_option_doLogitTransform (m_prefix + "doLogitTransform" )
790 {
792 
793  queso_require_equal_to_msg(m_env.optionsInputFileName(), "", "this constructor is incompatible with the existence of an options input file");
794 
795  if ((m_env.subDisplayFile() != NULL ) &&
796  (m_ov.m_totallyMute == false)) {
797  *m_env.subDisplayFile() << "In MetropolisHastingsSGOptions::constructor(2)"
798  << ": after setting values of options with prefix '" << m_prefix
799  << "', state of object is:"
800  << "\n" << *this
801  << std::endl;
802  }
803 
804 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
805  if (m_ov.m_rawChainComputeStats) {
806  m_rawChainStatisticalOptionsObj = new SequenceStatisticalOptions(m_env,m_prefix + "rawChain_",m_ov.m_alternativeRawSsOptionsValues);
807  m_rawChainStatOptsInstantiated = true;
808  }
809  if (m_ov.m_filteredChainComputeStats) {
810  m_filteredChainStatisticalOptionsObj = new SequenceStatisticalOptions(m_env,m_prefix + "filteredChain_",m_ov.m_alternativeFilteredSsOptionsValues);
811  m_filteredChainStatOptsInstantiated = true;
812  }
813 #endif
814 }
815 // Copy constructor---------------------------------
817  const MLSamplingLevelOptions& mlOptions)
818  :
819 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
820  m_ov (NULL,NULL), // dakota
821  m_rawChainStatisticalOptionsObj (NULL),
822  m_rawChainStatOptsInstantiated (false),
823  m_filteredChainStatisticalOptionsObj (NULL),
824  m_filteredChainStatOptsInstantiated (false),
825 #else
826  m_ov (),
827 #endif
828  m_prefix (mlOptions.m_prefix),
829  m_env (mlOptions.env()),
830  m_optionsDesc (NULL),
831  m_option_help (m_prefix + "help" ),
832  m_option_dataOutputFileName (m_prefix + "dataOutputFileName" ),
833  m_option_dataOutputAllowAll (m_prefix + "dataOutputAllowAll" ),
834  m_option_dataOutputAllowedSet (m_prefix + "dataOutputAllowedSet" ),
835  m_option_totallyMute (m_prefix + "totallyMute" ),
836  m_option_initialPosition_dataInputFileName (m_prefix + "initialPosition_dataInputFileName" ),
837  m_option_initialPosition_dataInputFileType (m_prefix + "initialPosition_dataInputFileType" ),
838  m_option_initialProposalCovMatrix_dataInputFileName(m_prefix + "initialProposalCovMatrix_dataInputFileName"),
839  m_option_initialProposalCovMatrix_dataInputFileType(m_prefix + "initialProposalCovMatrix_dataInputFileType"),
840  m_option_listOfDisabledParameters (m_prefix + "listOfDisabledParameters" ),
841  m_option_rawChain_dataInputFileName (m_prefix + "rawChain_dataInputFileName" ),
842  m_option_rawChain_dataInputFileType (m_prefix + "rawChain_dataInputFileType" ),
843  m_option_rawChain_size (m_prefix + "rawChain_size" ),
844  m_option_rawChain_generateExtra (m_prefix + "rawChain_generateExtra" ),
845  m_option_rawChain_displayPeriod (m_prefix + "rawChain_displayPeriod" ),
846  m_option_rawChain_measureRunTimes (m_prefix + "rawChain_measureRunTimes" ),
847  m_option_rawChain_dataOutputPeriod (m_prefix + "rawChain_dataOutputPeriod" ),
848  m_option_rawChain_dataOutputFileName (m_prefix + "rawChain_dataOutputFileName" ),
849  m_option_rawChain_dataOutputFileType (m_prefix + "rawChain_dataOutputFileType" ),
850  m_option_rawChain_dataOutputAllowAll (m_prefix + "rawChain_dataOutputAllowAll" ),
851  m_option_rawChain_dataOutputAllowedSet (m_prefix + "rawChain_dataOutputAllowedSet" ),
852 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
853  m_option_rawChain_computeStats (m_prefix + "rawChain_computeStats" ),
854 #endif
855  m_option_filteredChain_generate (m_prefix + "filteredChain_generate" ),
856  m_option_filteredChain_discardedPortion (m_prefix + "filteredChain_discardedPortion" ),
857  m_option_filteredChain_lag (m_prefix + "filteredChain_lag" ),
858  m_option_filteredChain_dataOutputFileName (m_prefix + "filteredChain_dataOutputFileName" ),
859  m_option_filteredChain_dataOutputFileType (m_prefix + "filteredChain_dataOutputFileType" ),
860  m_option_filteredChain_dataOutputAllowAll (m_prefix + "filteredChain_dataOutputAllowAll" ),
861  m_option_filteredChain_dataOutputAllowedSet (m_prefix + "filteredChain_dataOutputAllowedSet" ),
862 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
863  m_option_filteredChain_computeStats (m_prefix + "filteredChain_computeStats" ),
864 #endif
865  m_option_displayCandidates (m_prefix + "displayCandidates" ),
866  m_option_putOutOfBoundsInChain (m_prefix + "putOutOfBoundsInChain" ),
867  m_option_tk_useLocalHessian (m_prefix + "tk_useLocalHessian" ),
868  m_option_tk_useNewtonComponent (m_prefix + "tk_useNewtonComponent" ),
869  m_option_dr_maxNumExtraStages (m_prefix + "dr_maxNumExtraStages" ),
870  m_option_dr_listOfScalesForExtraStages (m_prefix + "dr_listOfScalesForExtraStages" ),
871  m_option_dr_duringAmNonAdaptiveInt (m_prefix + "dr_duringAmNonAdaptiveInt" ),
872  m_option_am_keepInitialMatrix (m_prefix + "am_keepInitialMatrix" ),
873  m_option_am_initialNonAdaptInterval (m_prefix + "am_initialNonAdaptInterval" ),
874  m_option_am_adaptInterval (m_prefix + "am_adaptInterval" ),
875  m_option_am_adaptedMatrices_dataOutputPeriod (m_prefix + "am_adaptedMatrices_dataOutputPeriod" ),
876  m_option_am_adaptedMatrices_dataOutputFileName (m_prefix + "am_adaptedMatrices_dataOutputFileName" ),
877  m_option_am_adaptedMatrices_dataOutputFileType (m_prefix + "am_adaptedMatrices_dataOutputFileType" ),
878  m_option_am_adaptedMatrices_dataOutputAllowAll (m_prefix + "am_adaptedMatrices_dataOutputAllowAll" ),
879  m_option_am_adaptedMatrices_dataOutputAllowedSet (m_prefix + "am_adaptedMatrices_dataOutputAllowedSet" ),
880  m_option_am_eta (m_prefix + "am_eta" ),
881  m_option_am_epsilon (m_prefix + "am_epsilon" ),
882  m_option_enableBrooksGelmanConvMonitor (m_prefix + "enableBrooksGelmanConvMonitor" ),
883  m_option_BrooksGelmanLag (m_prefix + "BrooksGelmanLag" ),
884  m_option_outputLogLikelihood (m_prefix + "outputLogLikelihood" ),
885  m_option_outputLogTarget (m_prefix + "outputLogTarget" ),
886  m_option_doLogitTransform (m_prefix + "doLogitTransform" )
887 {
889 
893  m_ov.m_totallyMute = mlOptions.m_totallyMute;
901  m_ov.m_rawChainSize = mlOptions.m_rawChainSize;
910 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
911  m_ov.m_rawChainComputeStats = mlOptions.m_rawChainComputeStats;
912 #endif
920 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
921  m_ov.m_filteredChainComputeStats = mlOptions.m_filteredChainComputeStats;
922 #endif
938  m_ov.m_amEta = mlOptions.m_amEta;
939  m_ov.m_amEpsilon = mlOptions.m_amEpsilon;
945 
946 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
947 //m_ov.m_alternativeRawSsOptionsValues = mlOptions.; // dakota
948 //m_ov.m_alternativeFilteredSsOptionsValues = mlOptions.; // dakota
949 #endif
950 
951 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
952  m_rawChainStatisticalOptionsObj = mlOptions.m_rawChainStatisticalOptionsObj; // dakota
953  m_rawChainStatOptsInstantiated = false;
954  m_filteredChainStatisticalOptionsObj = mlOptions.m_filteredChainStatisticalOptionsObj; // dakota
955  m_filteredChainStatOptsInstantiated = false;
956 #endif
957  if ((m_env.subDisplayFile() != NULL ) &&
958  (m_ov.m_totallyMute == false)) {
959  *m_env.subDisplayFile() << "In MetropolisHastingsSGOptions::constructor(3)"
960  << ": after copying values of options with prefix '" << m_prefix
961  << "', state of object is:"
962  << "\n" << *this
963  << std::endl;
964  }
965 }
966 // Destructor --------------------------------------
968 {
970 
971 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
972  if (m_filteredChainStatOptsInstantiated) delete m_filteredChainStatisticalOptionsObj;
973  if (m_rawChainStatOptsInstantiated ) delete m_rawChainStatisticalOptionsObj;
974 #endif
975  if (m_optionsDesc ) delete m_optionsDesc;
976 }
977 
978 // I/O methods -------------------------------------
979 void
981 {
983 
984  queso_require_msg(m_optionsDesc, "m_optionsDesc variable is NULL");
985 
989 
990  if ((m_env.subDisplayFile() != NULL) &&
991  (m_ov.m_totallyMute == false )) {
992  *m_env.subDisplayFile() << "In MetropolisHastingsSGOptions::scanOptionsValues()"
993  << ": after reading values of options with prefix '" << m_prefix
994  << "', state of object is:"
995  << "\n" << *this
996  << std::endl;
997  }
998 
999 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1000  if (m_ov.m_rawChainComputeStats) {
1001  m_rawChainStatisticalOptionsObj = new SequenceStatisticalOptions(m_env,m_prefix + "rawChain_");
1002  m_rawChainStatOptsInstantiated = true;
1003  }
1004  if (m_ov.m_filteredChainComputeStats) {
1005  m_filteredChainStatisticalOptionsObj = new SequenceStatisticalOptions(m_env,m_prefix + "filteredChain_");
1006  m_filteredChainStatOptsInstantiated = true;
1007  }
1008 #endif
1009 
1010  return;
1011 }
1012 // -------------------------------------------------
1013 void
1014 MetropolisHastingsSGOptions::print(std::ostream& os) const
1015 {
1016  queso_deprecated();
1017 
1020  << "\n" << m_option_dataOutputAllowedSet << " = ";
1021  for (std::set<unsigned int>::iterator setIt = m_ov.m_dataOutputAllowedSet.begin(); setIt != m_ov.m_dataOutputAllowedSet.end(); ++setIt) {
1022  os << *setIt << " ";
1023  }
1024  os << "\n" << m_option_totallyMute << " = " << m_ov.m_totallyMute
1029  << "\n" << m_option_listOfDisabledParameters << " = ";
1030  for (std::set<unsigned int>::iterator setIt = m_ov.m_parameterDisabledSet.begin(); setIt != m_ov.m_parameterDisabledSet.end(); ++setIt) {
1031  os << *setIt << " ";
1032  }
1035  << "\n" << m_option_rawChain_size << " = " << m_ov.m_rawChainSize
1043  << "\n" << m_option_rawChain_dataOutputAllowedSet << " = ";
1044  for (std::set<unsigned int>::iterator setIt = m_ov.m_rawChainDataOutputAllowedSet.begin(); setIt != m_ov.m_rawChainDataOutputAllowedSet.end(); ++setIt) {
1045  os << *setIt << " ";
1046  }
1047  os
1048 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1049  << "\n" << m_option_rawChain_computeStats << " = " << m_ov.m_rawChainComputeStats
1050 #endif
1053  << "\n" << m_option_filteredChain_lag << " = " << m_ov.m_filteredChainLag
1057  << "\n" << m_option_filteredChain_dataOutputAllowedSet << " = ";
1058  for (std::set<unsigned int>::iterator setIt = m_ov.m_filteredChainDataOutputAllowedSet.begin(); setIt != m_ov.m_filteredChainDataOutputAllowedSet.end(); ++setIt) {
1059  os << *setIt << " ";
1060  }
1061  os
1062 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1063  << "\n" << m_option_filteredChain_computeStats << " = " << m_ov.m_filteredChainComputeStats
1064 #endif
1065  << "\n" << m_option_displayCandidates << " = " << m_ov.m_displayCandidates
1070  << "\n" << m_option_dr_listOfScalesForExtraStages << " = ";
1071  for (unsigned int i = 0; i < m_ov.m_drScalesForExtraStages.size(); ++i) {
1072  os << m_ov.m_drScalesForExtraStages[i] << " ";
1073  }
1077  << "\n" << m_option_am_adaptInterval << " = " << m_ov.m_amAdaptInterval
1083  for (std::set<unsigned int>::iterator setIt = m_ov.m_amAdaptedMatricesDataOutputAllowedSet.begin(); setIt != m_ov.m_amAdaptedMatricesDataOutputAllowedSet.end(); ++setIt) {
1084  os << *setIt << " ";
1085  }
1086  os << "\n" << m_option_am_eta << " = " << m_ov.m_amEta
1087  << "\n" << m_option_am_epsilon << " = " << m_ov.m_amEpsilon
1089  << "\n" << m_option_BrooksGelmanLag << " = " << m_ov.m_BrooksGelmanLag
1091  << "\n" << m_option_outputLogTarget << " = " << m_ov.m_outputLogTarget
1092  << "\n" << m_option_doLogitTransform << " = " << m_ov.m_doLogitTransform
1093  << std::endl;
1094 
1095  return;
1096 }
1097 
1098 // Private methods----------------------------------
1099 void
1100 MetropolisHastingsSGOptions::defineMyOptions(boost::program_options::options_description& optionsDesc) const
1101 {
1102  queso_deprecated();
1103 
1104  optionsDesc.add_options()
1105  (m_option_help.c_str(), "produce help msg for Bayesian Metropolis-Hastings" )
1106  (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" )
1107  (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" )
1108  (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" )
1109  (m_option_totallyMute.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_TOTALLY_MUTE_ODV ), "totally mute (no printout msg)" )
1110  (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 " )
1111  (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 " )
1112  (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 " )
1113  (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 " )
1114  (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" )
1115  (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 " )
1116  (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 " )
1117  (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" )
1118  (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" )
1119  (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" )
1120  (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" )
1121  (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" )
1122  (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 " )
1123  (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 " )
1124  (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" )
1125  (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" )
1126 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1127  (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" )
1128 #endif
1129  (m_option_filteredChain_generate.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_FILTERED_CHAIN_GENERATE_ODV ), "generate filtered chain" )
1130  (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" )
1131  (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" )
1132  (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" )
1133  (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" )
1134  (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" )
1135  (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" )
1136 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1137  (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" )
1138 #endif
1139  (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" )
1140  (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" )
1141  (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" )
1142  (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" )
1143  (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" )
1144  (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" )
1145  (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" )
1146  (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" )
1147  (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" )
1148  (m_option_am_adaptInterval.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_AM_ADAPT_INTERVAL_ODV ), "'am' adaptation interval" )
1149  (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" )
1150  (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" )
1151  (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" )
1152  (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" )
1153  (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" )
1154  (m_option_am_eta.c_str(), boost::program_options::value<double >()->default_value(UQ_MH_SG_AM_ETA_ODV ), "'am' eta" )
1155  (m_option_am_epsilon.c_str(), boost::program_options::value<double >()->default_value(UQ_MH_SG_AM_EPSILON_ODV ), "'am' epsilon" )
1156  (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" )
1157  (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")
1158  (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" )
1159  (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" )
1160  (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" )
1161  ;
1162 
1163  return;
1164 }
1165 // -------------------------------------------------
1166 void
1167 MetropolisHastingsSGOptions::getMyOptionValues(boost::program_options::options_description& optionsDesc)
1168 {
1169  queso_deprecated();
1170 
1171  if (m_env.allOptionsMap().count(m_option_help)) {
1172  if ((m_env.subDisplayFile()) &&
1173  (m_ov.m_totallyMute == false)) {
1174  *m_env.subDisplayFile() << optionsDesc
1175  << std::endl;
1176  }
1177  }
1178 
1180  m_ov.m_dataOutputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_dataOutputFileName]).as<std::string>();
1181  }
1182 
1183  if (m_env.allOptionsMap().count(m_option_dataOutputAllowAll.c_str())) {
1185  }
1186 
1187  if (m_ov.m_dataOutputAllowAll) {
1189  }
1191  m_ov.m_dataOutputAllowedSet.clear();
1192  std::vector<double> tmpAllow(0,0.);
1193  std::string inputString = m_env.allOptionsMap()[m_option_dataOutputAllowedSet].as<std::string>();
1194  MiscReadDoublesFromString(inputString,tmpAllow);
1195 
1196  if (tmpAllow.size() > 0) {
1197  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
1198  m_ov.m_dataOutputAllowedSet.insert((unsigned int) tmpAllow[i]);
1199  }
1200  }
1201  }
1202 
1203  if (m_env.allOptionsMap().count(m_option_totallyMute)) {
1204  m_ov.m_totallyMute = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_totallyMute]).as<bool>();
1205  }
1206 
1208  m_ov.m_initialPositionDataInputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_initialPosition_dataInputFileName]).as<std::string>();
1209  }
1210 
1212  m_ov.m_initialPositionDataInputFileType = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_initialPosition_dataInputFileType]).as<std::string>();
1213  }
1214 
1216  m_ov.m_initialProposalCovMatrixDataInputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_initialProposalCovMatrix_dataInputFileName]).as<std::string>();
1217  }
1218 
1220  m_ov.m_initialProposalCovMatrixDataInputFileType = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_initialProposalCovMatrix_dataInputFileType]).as<std::string>();
1221  }
1222 
1224  m_ov.m_parameterDisabledSet.clear();
1225  std::vector<double> tmpAllow(0,0.);
1226  std::string inputString = m_env.allOptionsMap()[m_option_listOfDisabledParameters].as<std::string>();
1227  MiscReadDoublesFromString(inputString,tmpAllow);
1228  if (tmpAllow.size() > 0) {
1229  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
1230  m_ov.m_parameterDisabledSet.insert((unsigned int) tmpAllow[i]);
1231  }
1232  }
1233  }
1234 
1236  m_ov.m_rawChainDataInputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_dataInputFileName]).as<std::string>();
1237  }
1238 
1240  m_ov.m_rawChainDataInputFileType = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_dataInputFileType]).as<std::string>();
1241  }
1242 
1244  m_ov.m_rawChainSize = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_size]).as<unsigned int>();
1245  }
1246 
1248  m_ov.m_rawChainDisplayPeriod = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_displayPeriod]).as<unsigned int>();
1249  }
1250 
1252  m_ov.m_rawChainMeasureRunTimes = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_measureRunTimes]).as<bool>();
1253  }
1254 
1256  m_ov.m_rawChainDataOutputPeriod = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_dataOutputPeriod]).as<unsigned int>();
1257  }
1258 
1260  m_ov.m_rawChainDataOutputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_dataOutputFileName]).as<std::string>();
1261  }
1262 
1264  m_ov.m_rawChainDataOutputFileType = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_dataOutputFileType]).as<std::string>();
1265  }
1266 
1269  }
1270 
1273  }
1276  std::vector<double> tmpAllow(0,0.);
1277  std::string inputString = m_env.allOptionsMap()[m_option_rawChain_dataOutputAllowedSet].as<std::string>();
1278  MiscReadDoublesFromString(inputString,tmpAllow);
1279 
1280  if (tmpAllow.size() > 0) {
1281  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
1282  m_ov.m_rawChainDataOutputAllowedSet.insert((unsigned int) tmpAllow[i]);
1283  }
1284  }
1285  }
1286 
1287 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1288  if (m_env.allOptionsMap().count(m_option_rawChain_computeStats)) {
1289  m_ov.m_rawChainComputeStats = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_computeStats]).as<bool>();
1290  }
1291 #endif
1293  m_ov.m_rawChainGenerateExtra = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_generateExtra]).as<bool>();
1294  }
1295 
1297  m_ov.m_filteredChainGenerate = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_filteredChain_generate]).as<bool>();
1298  }
1299 
1301  m_ov.m_filteredChainDiscardedPortion = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_filteredChain_discardedPortion]).as<double>();
1302  }
1303 
1305  m_ov.m_filteredChainLag = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_filteredChain_lag]).as<unsigned int>();
1306  }
1307  if ((m_ov.m_filteredChainGenerate == true) &&
1308  (m_ov.m_filteredChainLag < 2 )) {
1309  std::cerr << "WARNING In MetropolisHastingsSG<P_V,P_M>::getMyOptionsValues()"
1310  << ", worldRank " << m_env.worldRank()
1311  << ", fullRank " << m_env.fullRank()
1312  << ", subEnvironment " << m_env.subId()
1313  << ", subRank " << m_env.subRank()
1314  << ", inter0Rank " << m_env.inter0Rank()
1315  << ": forcing the value of '" << m_option_filteredChain_lag
1316  << "' from " << m_ov.m_filteredChainLag
1317  << " to " << 2
1318  << std::endl;
1320  }
1321 
1323  m_ov.m_filteredChainDataOutputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_filteredChain_dataOutputFileName]).as<std::string>();
1324  }
1325 
1327  m_ov.m_filteredChainDataOutputFileType = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_filteredChain_dataOutputFileType]).as<std::string>();
1328  }
1329 
1332  }
1333 
1336  }
1339  std::vector<double> tmpAllow(0,0.);
1340  std::string inputString = m_env.allOptionsMap()[m_option_filteredChain_dataOutputAllowedSet].as<std::string>();
1341  MiscReadDoublesFromString(inputString,tmpAllow);
1342 
1343  if (tmpAllow.size() > 0) {
1344  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
1345  m_ov.m_filteredChainDataOutputAllowedSet.insert((unsigned int) tmpAllow[i]);
1346  }
1347  }
1348  }
1349 
1350 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1351  if (m_env.allOptionsMap().count(m_option_filteredChain_computeStats)) {
1352  m_ov.m_filteredChainComputeStats = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_filteredChain_computeStats]).as<bool>();
1353  }
1354 #endif
1356  m_ov.m_displayCandidates = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_displayCandidates]).as<bool>();
1357  }
1358 
1360  m_ov.m_putOutOfBoundsInChain = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_putOutOfBoundsInChain]).as<bool>();
1361  }
1362 
1364  m_ov.m_tkUseLocalHessian = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_tk_useLocalHessian]).as<bool>();
1365  }
1366 
1368  m_ov.m_tkUseNewtonComponent = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_tk_useNewtonComponent]).as<bool>();
1369  }
1370 
1372  m_ov.m_drMaxNumExtraStages = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_dr_maxNumExtraStages]).as<unsigned int>();
1373  }
1374 
1375  std::vector<double> tmpScales(0,0.);
1377  std::string inputString = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_dr_listOfScalesForExtraStages]).as<std::string>();
1378  MiscReadDoublesFromString(inputString,tmpScales);
1379  //if (m_env.subDisplayFile()) {
1380  // *m_env.subDisplayFile() << "In MetropolisHastingsSG<P_V,P_M>::getMyOptionValues(): scales =";
1381  // for (unsigned int i = 0; i < tmpScales.size(); ++i) {
1382  // *m_env.subDisplayFile() << " " << tmpScales[i];
1383  // }
1384  // *m_env.subDisplayFile() << std::endl;
1385  //}
1386  }
1387 
1388  if (m_ov.m_drMaxNumExtraStages > 0) {
1389  double scale = 1.0;
1390  unsigned int tmpSize = tmpScales.size();
1391 
1394  for (unsigned int i = 0; i < m_ov.m_drMaxNumExtraStages; ++i) {
1395  if (i < tmpSize) scale = tmpScales[i];
1397  }
1398  //updateTK();
1399  }
1400 
1402  m_ov.m_drDuringAmNonAdaptiveInt = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_dr_duringAmNonAdaptiveInt]).as<bool>();
1403  }
1404 
1406  m_ov.m_amKeepInitialMatrix = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_am_keepInitialMatrix]).as<bool>();
1407  }
1408 
1410  m_ov.m_amInitialNonAdaptInterval = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_am_initialNonAdaptInterval]).as<unsigned int>();
1411  }
1412 
1414  m_ov.m_amAdaptInterval = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_am_adaptInterval]).as<unsigned int>();
1415  }
1416 
1418  m_ov.m_amAdaptedMatricesDataOutputPeriod = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_am_adaptedMatrices_dataOutputPeriod]).as<unsigned int>();
1419  }
1420 
1422  m_ov.m_amAdaptedMatricesDataOutputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_am_adaptedMatrices_dataOutputFileName]).as<std::string>();
1423  }
1424 
1426  m_ov.m_amAdaptedMatricesDataOutputFileType = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_am_adaptedMatrices_dataOutputFileType]).as<std::string>();
1427  }
1428 
1431  }
1432 
1435  }
1438  std::vector<double> tmpAllow(0,0.);
1439  std::string inputString = m_env.allOptionsMap()[m_option_am_adaptedMatrices_dataOutputAllowedSet].as<std::string>();
1440  MiscReadDoublesFromString(inputString,tmpAllow);
1441 
1442  if (tmpAllow.size() > 0) {
1443  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
1444  m_ov.m_amAdaptedMatricesDataOutputAllowedSet.insert((unsigned int) tmpAllow[i]);
1445  }
1446  }
1447  }
1448 
1449  if (m_env.allOptionsMap().count(m_option_am_eta)) {
1450  m_ov.m_amEta = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_am_eta]).as<double>();
1451  }
1452 
1453  if (m_env.allOptionsMap().count(m_option_am_epsilon)) {
1454  m_ov.m_amEpsilon = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_am_epsilon]).as<double>();
1455  }
1456 
1458  m_ov.m_enableBrooksGelmanConvMonitor = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_enableBrooksGelmanConvMonitor]).as<unsigned int>();
1459  }
1460 
1462  m_ov.m_BrooksGelmanLag = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_BrooksGelmanLag]).as<unsigned int>();
1463  }
1464 
1466  m_ov.m_outputLogLikelihood = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_outputLogLikelihood]).as<bool>();
1467  }
1468 
1470  m_ov.m_outputLogTarget = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_outputLogTarget]).as<bool>();
1471  }
1472 
1474  m_ov.m_doLogitTransform = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_doLogitTransform]).as<bool>();
1475  }
1476 }
1477 
1478 // --------------------------------------------------
1479 // Operator declared outside class definition ------
1480 // --------------------------------------------------
1481 
1482 std::ostream& operator<<(std::ostream& os, const MetropolisHastingsSGOptions& obj)
1483 {
1484  queso_deprecated();
1485 
1486  obj.print(os);
1487 
1488  return os;
1489 }
1490 
1491 } // End namespace QUESO
std::string m_filteredChainDataOutputFileType
The filetype of m_filteredChainDataOutputFileName. Only &quot;m&quot; (matlab) is currently supported...
std::string m_option_filteredChain_dataOutputAllowAll
Option name for MhOptionsValues::m_filteredChainDataOutputAllowAll. Option name is m_prefix + &quot;mh_fil...
std::string m_option_am_adaptedMatrices_dataOutputPeriod
Option name for MhOptionsValues::m_amAdaptedMatricesDataOutputPeriod. Option name is m_prefix + &quot;mh_a...
bool m_doLogitTransform
Flag for deciding whether or not to do logit transform of bounded domains Default is true...
unsigned int m_rawChainDisplayPeriod
Period of message display during raw chain generation.
std::string m_option_filteredChain_dataOutputAllowedSet
Option name for MhOptionsValues::m_filteredChainDataOutputAllowedSet. Option name is m_prefix + &quot;mh_f...
#define UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV
#define UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_NAME_ODV
std::string m_help
If non-empty string, print options and values to the output file.
std::string m_option_rawChain_dataOutputPeriod
Option name for MhOptionsValues::m_rawChainDataOutputPeriod. Option name is m_prefix + &quot;mh_rawChain_d...
bool m_rawChainGenerateExtra
If true, extra chain information is computed/stored.
#define UQ_MH_SG_OUTPUT_LOG_LIKELIHOOD
#define UQ_MH_SG_LIST_OF_DISABLED_PARAMETERS_ODV
std::string m_option_displayCandidates
Option name for MhOptionsValues::m_displayCandidates. Option name is m_prefix + &quot;mh_displayCandidates...
double m_filteredChainDiscardedPortion
Initial discarded portion for chain filtering.
int subRank() const
Access function for sub-rank.
Definition: Environment.C:241
std::string m_option_dataOutputFileName
Option name for MhOptionsValues::m_dataOutputFileName. Option name is m_prefix + &quot;mh_dataOutputFileNa...
std::string m_option_am_eta
Option name for MhOptionsValues::m_amEta. Option name is m_prefix + &quot;mh_am_eta&quot;.
double m_amEpsilon
Regularisation parameter for the DRAM covariance matrix.
bool m_tkUseNewtonComponent
This option is a no-op. Default is true.
void defineMyOptions(boost::program_options::options_description &optionsDesc) const
Defines the options for the Metropolis-Hastings generator of samples as the default options...
std::vector< double > m_drScalesForExtraStages
&#39;dr&#39; list of scales for proposal covariance matrices from 2nd stage on.
#define UQ_MH_SG_DR_MAX_NUM_EXTRA_STAGES_ODV
std::string m_dataOutputFileName
Name of generic output file.
#define UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV
std::string m_option_dataOutputAllowAll
Option name for MhOptionsValues::m_dataOutputAllowAll. Option name is m_prefix + &quot;mh_dataOutputAllowA...
#define UQ_MH_SG_AM_KEEP_INITIAL_MATRIX_ODV
std::string m_option_initialPosition_dataInputFileName
Option name for MhOptionsValues::m_initialPositionDataInputFileName. Option name is m_prefix + &quot;mh_in...
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_initialPositionDataInputFileType
Type of input file for initial position.
void scanInputFileForMyOptions(const boost::program_options::options_description &optionsDesc) const
This method scans the input file provided by the user to QUESO.
Definition: Environment.C:345
bool m_tkUseNewtonComponent
Whether or not &#39;proposal&#39; uses Newton component.
void scanOptionsValues()
It scans the option values from the options input file.
std::string m_option_dr_listOfScalesForExtraStages
Option name for MhOptionsValues::m_drScalesForExtraStages. Option name is m_prefix + &quot;mh_dr_listOfSca...
bool m_amKeepInitialMatrix
Whether or not &#39;am&#39; will keep initial (given) matrix.
std::string m_option_am_adaptedMatrices_dataOutputAllowAll
Option name for MhOptionsValues::m_amAdaptedMatricesDataOutputAllowAll. Option name is m_prefix + &quot;mh...
bool m_rawChainMeasureRunTimes
Whether or not to measure run times.
std::string m_initialPositionDataInputFileType
The filetype of m_initialPositionDataInputFileName. Only &quot;m&quot; (matlab) is currently supported...
std::string m_rawChainDataInputFileName
Filename for reading an already-produced Markov chain.
std::string m_option_outputLogLikelihood
Option name for MhOptionsValues::m_outputLogLikelihood. Option name is m_prefix + &quot;mh_outputLogLikeli...
std::string m_filteredChainDataOutputFileName
If not &quot;.&quot;, file name to save the filtered chain to. Default is &quot;.&quot;.
std::set< unsigned int > m_filteredChainDataOutputAllowedSet
subEnvs that will write to output file for filtered chain.
std::string m_option_filteredChain_discardedPortion
Option name for MhOptionsValues::m_filteredChainDiscardedPortion. Option name is m_prefix + &quot;mh_filte...
#define UQ_MH_SG_DATA_OUTPUT_ALLOW_ALL_ODV
#define UQ_MH_SG_DR_LIST_OF_SCALES_FOR_EXTRA_STAGES_ODV
int fullRank() const
Returns the process full rank.
Definition: Environment.C:222
unsigned int m_amAdaptInterval
The frequency at which to adapt the proposal covariance matrix.
#define UQ_MH_SG_RAW_CHAIN_MEASURE_RUN_TIMES_ODV
#define queso_require_not_equal_to_msg(expr1, expr2, msg)
Definition: asserts.h:86
#define UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV
unsigned int m_amAdaptedMatricesDataOutputPeriod
Period for outputing &#39;am&#39; adapted matrices.
std::set< unsigned int > m_amAdaptedMatricesDataOutputAllowedSet
subEnvs that will write to output file for &#39;am&#39; adapted matrices.
#define UQ_MH_SG_RAW_CHAIN_GENERATE_EXTRA_ODV
MetropolisHastingsSGOptions(const BaseEnvironment &env, const char *prefix)
Constructor: reads options from the input file.
double m_amEta
Proposal covariance scaling factor, usually 2.4 * 2.4 / d.
bool m_totallyMute
Whether or not to be totally mute (no printout message).
unsigned int m_rawChainDataOutputPeriod
The frequency with which to write chain output. Defaults to 0.
bool m_filteredChainGenerate
Whether or not to generate filtered chain.
std::string m_amAdaptedMatricesDataOutputFileName
Name of output file for &#39;am&#39; adapted matrices.
bool m_rawChainDataOutputAllowAll
Whether or not subEnvs will write to output file for raw chain.
#define UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_ALLOWED_SET_ODV
bool m_displayCandidates
Display candidates generated in the core MH algorithm.
#define UQ_MH_SG_ENABLE_BROOKS_GELMAN_CONV_MONITOR
bool m_outputLogTarget
Flag for deciding whether or not to dump log target values in output Default is true.
std::vector< double > m_drScalesForExtraStages
The vector of scale factors for the proposal covariance matrix to use for delayed rejection...
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
#define UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_NAME_ODV
std::string m_initialPositionDataInputFileName
Name of input file for initial position.
This class provides options for each level of the Multilevel sequence generator if no input file is a...
#define UQ_MH_SG_DR_DURING_AM_NON_ADAPTIVE_INT_ODV
std::set< unsigned int > m_amAdaptedMatricesDataOutputAllowedSet
This option is a no-op. The default is the empty set.
std::string m_initialProposalCovMatrixDataInputFileType
Type of input file for initial proposal covariance matrix.
boost::program_options::variables_map & allOptionsMap() const
Definition: Environment.C:336
std::string m_option_am_adaptInterval
Option name for MhOptionsValues::m_amAdaptInterval. Option name is m_prefix + &quot;mh_am_adaptInterval&quot;.
std::string m_initialProposalCovMatrixDataInputFileName
Name of input file for initial proposal covariance matrix.
unsigned int m_filteredChainLag
Set the lag for the filtered chain. Default is 1.
int inter0Rank() const
Returns the process inter0 rank.
Definition: Environment.C:261
std::string m_rawChainDataOutputFileName
Name of output file for raw chain.
void print(std::ostream &os) const
It prints the option values.
unsigned int m_rawChainSize
Size of raw chain.
std::string m_option_filteredChain_dataOutputFileName
Option name for MhOptionsValues::m_filteredChainDataOutputFileName. Option name is m_prefix + &quot;mh_fil...
#define UQ_MH_SG_FILTERED_CHAIN_GENERATE_ODV
std::string m_option_dr_maxNumExtraStages
Option name for MhOptionsValues::m_drMaxNumExtraStages. Option name is m_prefix + &quot;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_am_adaptedMatrices_dataOutputFileName
Option name for MhOptionsValues::m_amAdaptedMatricesDataOutputFileName. Option name is m_prefix + &quot;mh...
unsigned int m_rawChainSize
The size of the chain (number of posterior samples) to generate. Default is 100.
#define UQ_MH_SG_DISPLAY_CANDIDATES_ODV
#define UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_NAME_ODV
std::string m_option_totallyMute
Option name for MhOptionsValues::m_totallyMute. Option name is m_prefix + &quot;mh_totallyMute&quot;.
bool m_tkUseLocalHessian
Whether or not &#39;proposal&#39; uses local Hessian.
unsigned int m_drMaxNumExtraStages
The number of delayed rejection stages to do. Default is 0.
std::set< unsigned int > m_dataOutputAllowedSet
subEnvs that will write to generic output file.
std::string m_option_initialProposalCovMatrix_dataInputFileType
Option name for MhOptionsValues::m_initialProposalCovMatrixDataInputFileType. Option name is m_prefix...
std::string m_amAdaptedMatricesDataOutputFileType
Type of output file for &#39;am&#39; adapted matrices.
std::set< unsigned int > m_parameterDisabledSet
#define queso_require_equal_to_msg(expr1, expr2, msg)
Definition: asserts.h:85
double scale
Definition: ann2fig.cpp:85
#define UQ_MH_SG_BROOKS_GELMAN_LAG
bool m_amAdaptedMatricesDataOutputAllowAll
This option is a no-op. The default is false.
bool m_putOutOfBoundsInChain
Flag to tell QUESO how chains should be upon generating a proposal that is out of the problem domain...
#define UQ_MH_SG_PUT_OUT_OF_BOUNDS_IN_CHAIN_ODV
std::string m_rawChainDataOutputFileType
Type of output file for raw chain.
#define UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_PERIOD_ODV
#define UQ_MH_SG_RAW_CHAIN_SIZE_ODV
#define UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_TYPE_ODV
unsigned int m_amAdaptedMatricesDataOutputPeriod
The frequency (after m_amInitialNonAdaptInterval samples are done) of printing the last adapted propo...
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
Definition: Environment.C:307
bool m_amKeepInitialMatrix
This option is a no-op. The default is false.
bool m_rawChainGenerateExtra
Generate extra information about raw chain.
void scanInputFile()
This is the method that parses the input file.
std::string m_option_rawChain_measureRunTimes
Option name for MhOptionsValues::m_rawChainMeasureRunTimes. Option name is m_prefix + &quot;mh_rawChain_me...
std::string m_option_rawChain_size
Option name for MhOptionsValues::m_rawChainSize. Option name is m_prefix + &quot;mh_rawChain_size&quot;.
unsigned int m_amInitialNonAdaptInterval
&#39;am&#39; initial non adaptation interval
#define UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOWED_SET_ODV
#define queso_require_msg(asserted, msg)
Definition: asserts.h:69
std::string m_rawChainDataInputFileType
Type of input file for raw chain.
unsigned int m_rawChainDisplayPeriod
The frequency with which to output diagnostic information.
#define UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV
void checkOptions(const BaseEnvironment *env)
#define UQ_MH_SG_DATA_OUTPUT_ALLOWED_SET_ODV
MhOptionsValues & operator=(const MhOptionsValues &rhs)
Assignment operator; it copies rhs to this.
std::string m_initialProposalCovMatrixDataInputFileName
If not &quot;.&quot;, reads the contents of the file as the initial proposal covariance matrix.
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:274
std::string m_option_am_adaptedMatrices_dataOutputAllowedSet
Option name for MhOptionsValues::m_amAdaptedMatricesDataOutputAllowedSet. Option name is m_prefix + &quot;...
unsigned int m_amAdaptInterval
&#39;am&#39; adaptation interval.
bool m_dataOutputAllowAll
If true, all processes write output and m_dataOutputAllowedSet is ignored.
#define UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_TYPE_ODV
bool m_filteredChainDataOutputAllowAll
Whether or not subEnvs will write to output file for filtered chain.
std::string m_option_dr_duringAmNonAdaptiveInt
Option name for MhOptionsValues::m_drDuringAmNonAdaptiveInt. Option name is m_prefix + &quot;mh_dr_duringA...
std::string m_option_rawChain_generateExtra
Option name for MhOptionsValues::m_rawChainGenerateExtra. Option name is m_prefix + &quot;mh_rawChain_gene...
void copy(const MhOptionsValues &src)
Copies the option values from src to this.
#define UQ_MH_SG_RAW_CHAIN_DISPLAY_PERIOD_ODV
std::string m_option_rawChain_dataOutputAllowedSet
Option name for MhOptionsValues::m_rawChainDataOutputAllowedSet. Option name is m_prefix + &quot;mh_rawCha...
std::string m_option_enableBrooksGelmanConvMonitor
Option name for MhOptionsValues::m_enableBrooksGelmanConvMonitor. Option name is m_prefix + &quot;mh_enabl...
std::string m_option_rawChain_dataOutputAllowAll
Option name for MhOptionsValues::m_rawChainDataOutputAllowAll. Option name is m_prefix + &quot;mh_rawChain...
unsigned int m_amInitialNonAdaptInterval
The number of initial samples to do without adapting the proposal covariance matrix.
std::string m_option_tk_useLocalHessian
Option name for MhOptionsValues::m_tkUseLocalHessian. Option name is m_prefix + &quot;mh_tk_useLocalHessia...
std::string m_rawChainDataInputFileName
Name of input file for raw chain.
std::string m_option_filteredChain_generate
Option name for MhOptionsValues::m_filteredChainGenerate. Option name is m_prefix + &quot;mh_filteredChain...
std::string m_option_am_initialNonAdaptInterval
Option name for MhOptionsValues::m_amInitialNonAdaptInterval. Option name is m_prefix + &quot;mh_am_initia...
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
Definition: Environment.h:193
unsigned int m_BrooksGelmanLag
The lag with which to compute the Brooks-Gelman convergence statistic.
#define UQ_MH_SG_TOTALLY_MUTE_ODV
double m_filteredChainDiscardedPortion
What initial fraction of the filtered chain is discarded.
std::string m_option_putOutOfBoundsInChain
Option name for MhOptionsValues::m_putOutOfBoundsInChain. Option name is m_prefix + &quot;mh_putOutOfBound...
std::string m_option_am_adaptedMatrices_dataOutputFileType
Option name for MhOptionsValues::m_amAdaptedMatricesDataOutputFileType. Option name is m_prefix + &quot;mh...
#define UQ_MH_SG_OUTPUT_LOG_TARGET
bool m_drDuringAmNonAdaptiveInt
Do delayed rejection during the initial non-adaptive part of sampling?
unsigned int subId() const
Access function to the number of each sub-environment Id: m_subId.
Definition: Environment.C:295
#define UQ_MH_SG_AM_ADAPT_INTERVAL_ODV
std::string m_option_am_keepInitialMatrix
Option name for MhOptionsValues::m_amKeepInitialMatrix. Option name is m_prefix + &quot;mh_am_keepInitialM...
#define UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_NAME_ODV
std::string m_rawChainDataOutputFileName
If not &quot;.&quot;, filename to write the Markov chain to.
void registerOption(std::string name, T defaultValue, std::string description)
Call this to register an option with the parser.
std::string m_filteredChainDataOutputFileType
Type of output file for filtered chain.
double m_amEta
&#39;am&#39; eta.
This class provides options for the Metropolis-Hastings generator of samples if no input file is avai...
std::string m_option_listOfDisabledParameters
Option name for MhOptionsValues::m_parameterDisabledSet. Option name is m_prefix + &quot;mh_listOfDisabled...
std::string m_option_rawChain_dataOutputFileName
Option name for MhOptionsValues::m_rawChainDataOutputFileName. Option name is m_prefix + &quot;mh_rawChain...
std::string m_option_BrooksGelmanLag
Option name for MhOptionsValues::m_BrooksGelmanLag. Option name is m_prefix + &quot;mh_BrooksGelmanLag&quot;.
#define UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_NAME_ODV
#define UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOW_ALL_ODV
double m_amEpsilon
&#39;am&#39; epsilon.
#define UQ_MH_SG_DO_LOGIT_TRANSFORM
bool m_amAdaptedMatricesDataOutputAllowAll
Whether or not subEnvs will write to output file for &#39;am&#39; adapted matrices.
std::string m_rawChainDataOutputFileType
The filetype of m_rawChainDataOutputFileName. Only &quot;m&quot; (matlab) is currently supported. Default is &quot;m&quot;.
unsigned int m_filteredChainLag
Spacing for chain filtering.
std::string m_filteredChainDataOutputFileName
Name of output file for filtered chain.
#define UQ_MH_SG_AM_INIT_NON_ADAPT_INT_ODV
#define UQ_MH_SG_TK_USE_NEWTON_COMPONENT_ODV
void MiscReadDoublesFromString(const std::string &inputString, std::vector< double > &outputDoubles)
Definition: Miscellaneous.C:40
std::string m_option_am_eta
See MhOptionsValues::m_amEta.
virtual ~MhOptionsValues()
Destructor.
unsigned int m_rawChainDataOutputPeriod
Period of message display during raw chain generation.
std::string m_option_filteredChain_lag
Option name for MhOptionsValues::m_filteredChainLag. Option name is m_prefix + &quot;mh_filteredChain_lag&quot;...
std::string m_option_rawChain_dataOutputFileType
Option name for MhOptionsValues::m_rawChainDataOutputFileType. Option name is m_prefix + &quot;mh_rawChain...
bool m_totallyMute
If true, zero output is written to files. Default is false.
#define queso_deprecated()
Definition: Defines.h:120
std::string m_option_help
Option name for MhOptionsValues::m_help. Option name is m_prefix + &quot;mh_help&quot;.
std::string m_initialPositionDataInputFileName
If not &quot;.&quot;, reads the contents of the file and uses that to start the MCMC. Default is &quot;...
std::string m_option_am_epsilon
See MhOptionsValues::m_amEpsilon.
#define UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_TYPE_ODV
std::string m_option_rawChain_dataInputFileType
Option name for MhOptionsValues::m_rawChainDataInputFileType. Option name is m_prefix + &quot;mh_rawChain_...
std::string m_option_initialPosition_dataInputFileType
Option name for MhOptionsValues::m_initialPositionDataInputFileType. Option name is m_prefix + &quot;mh_in...
#define UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_PERIOD_ODV
MhOptionsValues()
Default constructor.
std::string m_option_initialProposalCovMatrix_dataInputFileName
Option name for MhOptionsValues::m_initialProposalCovMatrixDataInputFileName. Option name is m_prefix...
std::string m_option_dataOutputAllowedSet
Option name for MhOptionsValues::m_dataOutputAllowedSet. Option name is m_prefix + &quot;mh_dataOutputAllo...
bool m_doLogitTransform
Whether or not a logit transform will be done for bounded domains.
#define UQ_MH_SG_FILTERED_CHAIN_DISCARDED_PORTION_ODV
BoostInputOptionsParser * m_parser
#define UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_TYPE_ODV
bool m_dataOutputAllowAll
subEnvs that will write to generic output file.
#define queso_require_greater_equal_msg(expr1, expr2, msg)
Definition: asserts.h:90
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...
boost::program_options::options_description * m_optionsDesc
std::string m_option_am_epsilon
Option name for MhOptionsValues::m_amEpsilon. Option name is m_prefix + &quot;mh_am_epsilon&quot;.
std::set< unsigned int > m_parameterDisabledSet
Set of parameters that don&#39;t get sampled.
#define UQ_MH_SG_DATA_OUTPUT_FILE_NAME_ODV
#define UQ_MH_SG_AM_EPSILON_ODV
MhOptionsValues m_ov
This class is where the actual options are stored.
std::string m_option_outputLogTarget
Option name for MhOptionsValues::m_outputLogTarget. Option name is m_prefix + &quot;mh_outputLogTarget&quot;.
#define UQ_MH_SG_AM_ETA_ODV
unsigned int m_enableBrooksGelmanConvMonitor
The frequency with which to compute the Brooks-Gelman convergence statistic.
std::string m_option_tk_useNewtonComponent
Option name for MhOptionsValues::m_tkUseNewtonComponent. Option name is m_prefix + &quot;mh_tk_useNewtonCo...
bool m_rawChainMeasureRunTimes
If true, measures timings spent in various chain computions and writes them to the output file...
bool m_putOutOfBoundsInChain
Put &#39;out of bound&#39; candidates in chain as well.
#define UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_NAME_ODV
int worldRank() const
Returns the process world rank.
Definition: Environment.C:216
This class reads the options for the Metropolis-Hastings generator of samples from an input file...
std::string m_option_doLogitTransform
Option name for MhOptionsValues::m_doLogitTransform. Option name is m_prefix + &quot;mh_doLogitTransform&quot;...
#define UQ_MH_SG_TK_USE_LOCAL_HESSIAN_ODV
std::string m_rawChainDataInputFileType
The filetype of m_rawChainDataInputFileName. Only &quot;m&quot; (matlab) is currently supported. Default is &quot;m&quot;.
bool m_tkUseLocalHessian
Flag to tell QUESO whether or not to use Hessian information for the proposal covariance matrix...
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...
#define UQ_MH_SG_HELP
std::string m_initialProposalCovMatrixDataInputFileType
The filetype of m_initialProposalCovMatrixDataInputFileName. Only &quot;m&quot; (matlab) is currently supported...
unsigned int m_drMaxNumExtraStages
&#39;dr&#39; maximum number of extra stages.
bool m_outputLogLikelihood
Flag for deciding whether or not to dump log likelihood values in output. Default is true...
std::string m_option_filteredChain_dataOutputFileType
Option name for MhOptionsValues::m_filteredChainDataOutputFileType. Option name is m_prefix + &quot;mh_fil...
void getOption(std::string &name, T &value)
Get option name from the parser and set value to the parsed value.
std::set< unsigned int > m_rawChainDataOutputAllowedSet
subEnvs that will write to output file for raw chain.
std::string m_option_rawChain_displayPeriod
Option name for MhOptionsValues::m_rawChainDisplayPeriod. Option name is m_prefix + &quot;mh_rawChain_disp...
void getMyOptionValues(boost::program_options::options_description &optionsDesc)
Gets the sequence options defined to the Metropolis-Hastings algorithm.
std::string m_option_rawChain_dataInputFileName
Option name for MhOptionsValues::m_rawChainDataInputFileName. Option name is m_prefix + &quot;mh_rawChain_...
#define UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_ALLOWED_SET_ODV
std::string m_dataOutputFileName
The base name of output files where the chain (and related information) will be written.
std::string m_amAdaptedMatricesDataOutputFileName
If not &quot;.&quot;, this is the file to write adapted proposal covariance matrices to. Default is &quot;...
std::string m_amAdaptedMatricesDataOutputFileType
The filetype of m_amAdaptedMatricesDataOutputFileName. Only &quot;m&quot; (matlab) is currently supported...
#define UQ_MH_SG_FILTERED_CHAIN_LAG_ODV
bool m_drDuringAmNonAdaptiveInt
Whether or not &#39;dr&#39; is used during &#39;am&#39; non adaptive interval.

Generated on Thu Jun 11 2015 13:52:32 for queso-0.53.0 by  doxygen 1.8.5