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;
 
  173 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS 
  174   bool                               m_filteredChainComputeStats;
 
  230 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS 
  232   SsOptionsValues             m_alternativeRawSsOptionsValues;
 
  233   SsOptionsValues             m_alternativeFilteredSsOptionsValues;
 
  276   void print            (std::ostream& os) 
const;
 
  282 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS 
  283   SequenceStatisticalOptions* m_rawChainStatisticalOptionsObj;
 
  284   bool                               m_rawChainStatOptsInstantiated;
 
  285   SequenceStatisticalOptions* m_filteredChainStatisticalOptionsObj;
 
  286   bool                               m_filteredChainStatOptsInstantiated;
 
  323 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS 
  324   std::string                   m_option_rawChain_computeStats;
 
  333 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS 
  334   std::string                   m_option_filteredChain_computeStats;
 
  369 #endif // UQ_MH_SG_OPTIONS_H 
std::string m_option_outputLogTarget
std::string m_option_totallyMute
bool m_amKeepInitialMatrix
std::string m_initialPositionDataInputFileType
std::string m_option_dr_maxNumExtraStages
std::string m_option_am_eta
See MhOptionsValues::m_amEta. 
MhOptionsValues & operator=(const MhOptionsValues &rhs)
Assignment operator; it copies rhs to this. 
void defineMyOptions(po::options_description &optionsDesc) const 
Defines the options for the Metropolis-Hastings generator of samples as the default options...
This class reads the options for the Metropolis-Hastings generator of samples from an input file...
std::string m_amAdaptedMatricesDataOutputFileType
std::string m_option_tk_useNewtonComponent
bool m_rawChainDataOutputAllowAll
std::string m_option_am_keepInitialMatrix
bool m_doLogitTransform
Flag for deciding whether or not to do logit transform of bounded domains. 
unsigned int m_amAdaptInterval
po::options_description * m_optionsDesc
std::string m_option_putOutOfBoundsInChain
std::string m_option_am_adaptInterval
MhOptionsValues()
Default constructor. 
bool m_rawChainGenerateExtra
std::string m_option_dr_duringAmNonAdaptiveInt
void getMyOptionValues(po::options_description &optionsDesc)
Gets the sequence options defined to the Metropolis-Hastings algorithm. 
bool m_tkUseNewtonComponent
unsigned int m_rawChainSize
std::string m_option_tk_useLocalHessian
bool m_outputLogTarget
Flag for deciding whether or not to dump log target values in output. 
std::set< unsigned int > m_dataOutputAllowedSet
unsigned int m_drMaxNumExtraStages
std::string m_option_am_adaptedMatrices_dataOutputAllowAll
bool m_amAdaptedMatricesDataOutputAllowAll
std::string m_option_doLogitTransform
std::string m_option_rawChain_dataOutputAllowAll
std::string m_option_rawChain_dataOutputFileName
double m_amEta
Proposal covariance scaling factor, usually 2.4 * 2.4 / d. 
std::set< unsigned int > m_filteredChainDataOutputAllowedSet
void scanOptionsValues()
It scans the option values from the options input file. 
bool m_putOutOfBoundsInChain
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
void print(std::ostream &os) const 
It prints the option values. 
std::string m_option_initialPosition_dataInputFileName
std::ostream & operator<<(std::ostream &os, const BaseEnvironment &obj)
std::string m_option_am_adaptedMatrices_dataOutputAllowedSet
double m_amEpsilon
Regularisation parameter for the DRAM covariance matrix. 
std::string m_filteredChainDataOutputFileType
std::string m_option_initialProposalCovMatrix_dataInputFileType
std::string m_filteredChainDataOutputFileName
std::string m_option_filteredChain_discardedPortion
std::string m_option_rawChain_generateExtra
std::string m_option_displayCandidates
std::string m_option_rawChain_dataOutputFileType
MetropolisHastingsSGOptions(const BaseEnvironment &env, const char *prefix)
Constructor: reads options from the input file. 
unsigned int m_filteredChainLag
std::string m_option_BrooksGelmanLag
unsigned int m_rawChainDisplayPeriod
std::string m_option_filteredChain_lag
void copy(const MhOptionsValues &src)
Copies the option values from src to this. 
std::string m_option_am_epsilon
See MhOptionsValues::m_amEpsilon. 
unsigned int m_amAdaptedMatricesDataOutputPeriod
~MetropolisHastingsSGOptions()
Destructor. 
std::string m_option_am_initialNonAdaptInterval
std::string m_option_am_adaptedMatrices_dataOutputFileName
std::string m_option_am_adaptedMatrices_dataOutputFileType
std::string m_option_outputLogLikelihood
std::string m_option_dr_listOfScalesForExtraStages
std::string m_option_am_adaptedMatrices_dataOutputPeriod
~MhOptionsValues()
Destructor. 
std::vector< double > m_drScalesForExtraStages
std::set< unsigned int > m_parameterDisabledSet
bool m_filteredChainDataOutputAllowAll
bool m_outputLogLikelihood
Flag for deciding whether or not to dump log likelihood values in output. 
const BaseEnvironment & m_env
bool m_dataOutputAllowAll
bool m_rawChainMeasureRunTimes
std::string m_option_rawChain_size
std::string m_rawChainDataOutputFileType
unsigned int m_BrooksGelmanLag
std::string m_option_initialProposalCovMatrix_dataInputFileName
std::string m_rawChainDataOutputFileName
std::string m_option_rawChain_dataInputFileName
std::string m_option_rawChain_dataOutputAllowedSet
std::set< unsigned int > m_amAdaptedMatricesDataOutputAllowedSet
std::string m_option_filteredChain_generate
std::string m_option_rawChain_dataOutputPeriod
std::string m_option_filteredChain_dataOutputAllowedSet
std::string m_option_listOfDisabledParameters
unsigned int m_rawChainDataOutputPeriod
double m_filteredChainDiscardedPortion
std::string m_initialProposalCovMatrixDataInputFileName
std::string m_option_rawChain_measureRunTimes
std::string m_initialPositionDataInputFileName
bool m_filteredChainGenerate
bool m_drDuringAmNonAdaptiveInt
std::string m_dataOutputFileName
std::string m_option_dataOutputAllowedSet
std::string m_rawChainDataInputFileName
std::string m_option_enableBrooksGelmanConvMonitor
std::set< unsigned int > m_rawChainDataOutputAllowedSet
std::string m_option_dataOutputAllowAll
std::string m_option_rawChain_dataInputFileType
std::string m_option_rawChain_displayPeriod
std::string m_option_initialPosition_dataInputFileType
std::string m_initialProposalCovMatrixDataInputFileType
unsigned int m_enableBrooksGelmanConvMonitor
std::string m_option_filteredChain_dataOutputFileType
This class provides options for the Metropolis-Hastings generator of samples if no input file is avai...
std::string m_option_dataOutputFileName
unsigned int m_amInitialNonAdaptInterval
std::string m_rawChainDataInputFileType
std::string m_amAdaptedMatricesDataOutputFileName
MhOptionsValues m_ov
This class is where the actual options are stored. 
This class provides options for each level of the Multilevel sequence generator if no input file is a...
std::string m_option_help
std::string m_option_filteredChain_dataOutputFileName
std::string m_option_filteredChain_dataOutputAllowAll