25 #ifndef UQ_MH_SG_OPTIONS_H
26 #define UQ_MH_SG_OPTIONS_H
28 #include <queso/Environment.h>
29 #include <queso/MLSamplingLevelOptions.h>
30 #include <queso/SequenceStatisticalOptions.h>
32 #undef UQ_MH_SG_REQUIRES_INVERTED_COV_MATRICES
33 #define UQ_NOTHING_JUST_FOR_TEST_OF_SVN_ID 1
35 #define UQ_MH_SG_FILENAME_FOR_NO_FILE "."
38 #define UQ_MH_SG_DATA_OUTPUT_FILE_NAME_ODV UQ_MH_SG_FILENAME_FOR_NO_FILE
39 #define UQ_MH_SG_DATA_OUTPUT_ALLOW_ALL_ODV 0
40 #define UQ_MH_SG_DATA_OUTPUT_ALLOWED_SET_ODV ""
42 #define UQ_MH_SG_TOTALLY_MUTE_ODV 0
43 #define UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_NAME_ODV UQ_MH_SG_FILENAME_FOR_NO_FILE
44 #define UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_TYPE_ODV UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
45 #define UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_NAME_ODV UQ_MH_SG_FILENAME_FOR_NO_FILE
46 #define UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_TYPE_ODV UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
47 #define UQ_MH_SG_LIST_OF_DISABLED_PARAMETERS_ODV ""
48 #define UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_NAME_ODV UQ_MH_SG_FILENAME_FOR_NO_FILE
49 #define UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_TYPE_ODV UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
50 #define UQ_MH_SG_RAW_CHAIN_SIZE_ODV 100
51 #define UQ_MH_SG_RAW_CHAIN_GENERATE_EXTRA_ODV 0
52 #define UQ_MH_SG_RAW_CHAIN_DISPLAY_PERIOD_ODV 500
53 #define UQ_MH_SG_RAW_CHAIN_MEASURE_RUN_TIMES_ODV 1
54 #define UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_PERIOD_ODV 0
55 #define UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_NAME_ODV UQ_MH_SG_FILENAME_FOR_NO_FILE
56 #define UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
57 #define UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV 0
58 #define UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_ALLOWED_SET_ODV ""
59 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
60 #define UQ_MH_SG_RAW_CHAIN_COMPUTE_STATS_ODV 0
62 #define UQ_MH_SG_FILTERED_CHAIN_GENERATE_ODV 0
63 #define UQ_MH_SG_FILTERED_CHAIN_DISCARDED_PORTION_ODV 0.
64 #define UQ_MH_SG_FILTERED_CHAIN_LAG_ODV 1
65 #define UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_NAME_ODV UQ_MH_SG_FILENAME_FOR_NO_FILE
66 #define UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
67 #define UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV 0
68 #define UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_ALLOWED_SET_ODV ""
69 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
70 #define UQ_MH_SG_FILTERED_CHAIN_COMPUTE_STATS_ODV 0
72 #define UQ_MH_SG_DISPLAY_CANDIDATES_ODV 0
73 #define UQ_MH_SG_PUT_OUT_OF_BOUNDS_IN_CHAIN_ODV 1
74 #define UQ_MH_SG_TK_USE_LOCAL_HESSIAN_ODV 0
75 #define UQ_MH_SG_TK_USE_NEWTON_COMPONENT_ODV 1
76 #define UQ_MH_SG_DR_MAX_NUM_EXTRA_STAGES_ODV 0
77 #define UQ_MH_SG_DR_LIST_OF_SCALES_FOR_EXTRA_STAGES_ODV ""
78 #define UQ_MH_SG_DR_DURING_AM_NON_ADAPTIVE_INT_ODV 1
79 #define UQ_MH_SG_AM_KEEP_INITIAL_MATRIX_ODV 0
80 #define UQ_MH_SG_AM_INIT_NON_ADAPT_INT_ODV 0
81 #define UQ_MH_SG_AM_ADAPT_INTERVAL_ODV 0
82 #define UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_PERIOD_ODV 0
83 #define UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_NAME_ODV UQ_MH_SG_FILENAME_FOR_NO_FILE
84 #define UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_TYPE_ODV UQ_FILE_EXTENSION_FOR_MATLAB_FORMAT
85 #define UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOW_ALL_ODV 0
86 #define UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOWED_SET_ODV ""
87 #define UQ_MH_SG_AM_ETA_ODV 1.
88 #define UQ_MH_SG_AM_EPSILON_ODV 1.e-5
89 #define UQ_MH_SG_ENABLE_BROOKS_GELMAN_CONV_MONITOR 0
90 #define UQ_MH_SG_BROOKS_GELMAN_LAG 100
91 #define UQ_MH_SG_OUTPUT_LOG_LIKELIHOOD 1
92 #define UQ_MH_SG_OUTPUT_LOG_TARGET 1
93 #define UQ_MH_SG_DO_LOGIT_TRANSFORM 1
117 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
119 const SsOptionsValues* alternativeFilteredSsOptionsValues);
162 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
163 bool m_rawChainComputeStats;
192 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
193 bool m_filteredChainComputeStats;
249 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
251 SsOptionsValues m_alternativeRawSsOptionsValues;
252 SsOptionsValues m_alternativeFilteredSsOptionsValues;
295 void print (std::ostream& os)
const;
301 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
302 SequenceStatisticalOptions* m_rawChainStatisticalOptionsObj;
303 bool m_rawChainStatOptsInstantiated;
304 SequenceStatisticalOptions* m_filteredChainStatisticalOptionsObj;
305 bool m_filteredChainStatOptsInstantiated;
342 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
343 std::string m_option_rawChain_computeStats;
352 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
353 std::string m_option_filteredChain_computeStats;
388 #endif // UQ_MH_SG_OPTIONS_H
This class provides options for the Metropolis-Hastings generator of samples if no input file is avai...
std::string m_initialPositionDataInputFileName
unsigned int m_rawChainSize
bool m_drDuringAmNonAdaptiveInt
std::string m_option_am_adaptedMatrices_dataOutputFileName
std::string m_option_initialPosition_dataInputFileName
std::string m_option_rawChain_dataOutputAllowedSet
std::string m_option_dr_listOfScalesForExtraStages
std::string m_option_tk_useLocalHessian
bool m_putOutOfBoundsInChain
This class provides options for each level of the Multilevel sequence generator if no input file is a...
std::string m_option_initialProposalCovMatrix_dataInputFileType
std::string m_initialProposalCovMatrixDataInputFileType
unsigned int m_filteredChainLag
Set the lag for the filtered chain. Default is 1.
bool m_filteredChainGenerate
Toggle the option to save a filtered chain. Default is 0 (off).
std::string m_option_initialPosition_dataInputFileType
MhOptionsValues & operator=(const MhOptionsValues &rhs)
Assignment operator; it copies rhs to this.
void print(std::ostream &os) const
It prints the option values.
std::string m_option_BrooksGelmanLag
std::string m_option_filteredChain_generate
std::string m_option_totallyMute
std::string m_option_enableBrooksGelmanConvMonitor
bool m_doLogitTransform
Flag for deciding whether or not to do logit transform of bounded domains.
unsigned int m_BrooksGelmanLag
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
This class reads the options for the Metropolis-Hastings generator of samples from an input file...
unsigned int m_drMaxNumExtraStages
std::string m_amAdaptedMatricesDataOutputFileName
MetropolisHastingsSGOptions(const BaseEnvironment &env, const char *prefix)
Constructor: reads options from the input file.
std::string m_option_rawChain_measureRunTimes
std::string m_option_filteredChain_dataOutputFileType
double m_amEta
Proposal covariance scaling factor, usually 2.4 * 2.4 / d.
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
std::vector< double > m_drScalesForExtraStages
std::string m_rawChainDataInputFileType
std::string m_initialProposalCovMatrixDataInputFileName
~MetropolisHastingsSGOptions()
Destructor.
std::string m_option_am_initialNonAdaptInterval
void defineMyOptions(po::options_description &optionsDesc) const
Defines the options for the Metropolis-Hastings generator of samples as the default options...
std::string m_option_filteredChain_dataOutputAllowAll
std::string m_option_am_adaptedMatrices_dataOutputFileType
unsigned int m_rawChainDataOutputPeriod
std::string m_filteredChainDataOutputFileName
File name to save the filtered chain to. Default is ".".
std::string m_option_tk_useNewtonComponent
std::string m_option_rawChain_dataInputFileName
unsigned int m_amAdaptInterval
std::string m_dataOutputFileName
std::set< unsigned int > m_parameterDisabledSet
std::string m_option_am_adaptedMatrices_dataOutputAllowAll
std::string m_option_doLogitTransform
std::string m_option_dr_duringAmNonAdaptiveInt
unsigned int m_rawChainDisplayPeriod
std::string m_option_initialProposalCovMatrix_dataInputFileName
std::string m_option_filteredChain_dataOutputFileName
~MhOptionsValues()
Destructor.
std::string m_option_dataOutputFileName
std::string m_option_rawChain_dataOutputPeriod
bool m_rawChainMeasureRunTimes
std::string m_option_listOfDisabledParameters
unsigned int m_enableBrooksGelmanConvMonitor
std::string m_option_dataOutputAllowedSet
std::string m_option_rawChain_dataOutputAllowAll
po::options_description * m_optionsDesc
bool m_outputLogLikelihood
Flag for deciding whether or not to dump log likelihood values in output.
std::string m_option_am_adaptInterval
MhOptionsValues()
Default constructor.
MhOptionsValues m_ov
This class is where the actual options are stored.
void getMyOptionValues(po::options_description &optionsDesc)
Gets the sequence options defined to the Metropolis-Hastings algorithm.
std::string m_option_help
std::string m_option_outputLogTarget
bool m_amKeepInitialMatrix
std::string m_option_rawChain_dataOutputFileName
std::string m_option_dataOutputAllowAll
std::string m_option_putOutOfBoundsInChain
std::set< unsigned int > m_dataOutputAllowedSet
std::string m_option_am_eta
See MhOptionsValues::m_amEta.
std::string m_option_rawChain_dataInputFileType
std::string m_option_rawChain_displayPeriod
std::string m_option_am_keepInitialMatrix
std::string m_option_am_adaptedMatrices_dataOutputPeriod
bool m_amAdaptedMatricesDataOutputAllowAll
unsigned int m_amInitialNonAdaptInterval
bool m_tkUseNewtonComponent
double m_amEpsilon
Regularisation parameter for the DRAM covariance matrix.
std::string m_option_filteredChain_discardedPortion
std::string m_option_rawChain_generateExtra
std::string m_option_rawChain_dataOutputFileType
bool m_rawChainGenerateExtra
std::set< unsigned int > m_filteredChainDataOutputAllowedSet
std::string m_option_dr_maxNumExtraStages
std::set< unsigned int > m_rawChainDataOutputAllowedSet
const BaseEnvironment & m_env
bool m_outputLogTarget
Flag for deciding whether or not to dump log target values in output.
std::string m_rawChainDataOutputFileName
void copy(const MhOptionsValues &src)
Copies the option values from src to this.
std::string m_option_outputLogLikelihood
std::string m_initialPositionDataInputFileType
std::string m_filteredChainDataOutputFileType
std::string m_rawChainDataInputFileName
unsigned int m_amAdaptedMatricesDataOutputPeriod
std::string m_option_filteredChain_lag
std::string m_option_displayCandidates
void scanOptionsValues()
It scans the option values from the options input file.
double m_filteredChainDiscardedPortion
What initial fraction of the filtered chain is discarded. Default is 0.
bool m_rawChainDataOutputAllowAll
std::string m_rawChainDataOutputFileType
std::string m_option_rawChain_size
std::string m_option_am_epsilon
See MhOptionsValues::m_amEpsilon.
std::string m_amAdaptedMatricesDataOutputFileType
std::set< unsigned int > m_amAdaptedMatricesDataOutputAllowedSet
std::string m_option_am_adaptedMatrices_dataOutputAllowedSet
std::string m_option_filteredChain_dataOutputAllowedSet
bool m_filteredChainDataOutputAllowAll
bool m_dataOutputAllowAll