queso-0.57.0
Public Attributes | Private Member Functions | Private Attributes | List of all members
QUESO::MetropolisHastingsSGOptions Class Reference

This class reads the options for the Metropolis-Hastings generator of samples from an input file. More...

#include <MetropolisHastingsSGOptions.h>

Collaboration diagram for QUESO::MetropolisHastingsSGOptions:
Collaboration graph
[legend]

Public Member Functions

Constructor/Destructor methods
 MetropolisHastingsSGOptions (const BaseEnvironment &env, const char *prefix)
 Constructor: reads options from the input file. More...
 
 MetropolisHastingsSGOptions (const BaseEnvironment &env, const char *prefix, const MhOptionsValues &alternativeOptionsValues)
 Constructor: with alternative option values. More...
 
 MetropolisHastingsSGOptions (const MLSamplingLevelOptions &mlOptions)
 Copy constructor. More...
 
 ~MetropolisHastingsSGOptions ()
 Destructor. More...
 
I/O methods
void scanOptionsValues ()
 It scans the option values from the options input file. More...
 
void print (std::ostream &os) const
 It prints the option values. More...
 

Public Attributes

MhOptionsValues m_ov
 This class is where the actual options are stored. More...
 
SequenceStatisticalOptionsm_rawChainStatisticalOptionsObj
 
bool m_rawChainStatOptsInstantiated
 
SequenceStatisticalOptionsm_filteredChainStatisticalOptionsObj
 
bool m_filteredChainStatOptsInstantiated
 
std::string m_prefix
 

Private Member Functions

void defineMyOptions (boost::program_options::options_description &optionsDesc) const
 Defines the options for the Metropolis-Hastings generator of samples as the default options. More...
 
void getMyOptionValues (boost::program_options::options_description &optionsDesc)
 Gets the sequence options defined to the Metropolis-Hastings algorithm. More...
 

Private Attributes

const BaseEnvironmentm_env
 
ScopedPtr
< boost::program_options::options_description >
::Type 
m_optionsDesc
 
std::string m_option_help
 
std::string m_option_dataOutputFileName
 
std::string m_option_dataOutputAllowAll
 
std::string m_option_dataOutputAllowedSet
 
std::string m_option_totallyMute
 
std::string m_option_initialPosition_dataInputFileName
 
std::string m_option_initialPosition_dataInputFileType
 
std::string m_option_initialProposalCovMatrix_dataInputFileName
 
std::string m_option_initialProposalCovMatrix_dataInputFileType
 
std::string m_option_listOfDisabledParameters
 
std::string m_option_rawChain_dataInputFileName
 
std::string m_option_rawChain_dataInputFileType
 
std::string m_option_rawChain_size
 
std::string m_option_rawChain_generateExtra
 
std::string m_option_rawChain_displayPeriod
 
std::string m_option_rawChain_measureRunTimes
 
std::string m_option_rawChain_dataOutputPeriod
 
std::string m_option_rawChain_dataOutputFileName
 
std::string m_option_rawChain_dataOutputFileType
 
std::string m_option_rawChain_dataOutputAllowAll
 
std::string m_option_rawChain_dataOutputAllowedSet
 
std::string m_option_rawChain_computeStats
 
std::string m_option_filteredChain_generate
 
std::string m_option_filteredChain_discardedPortion
 
std::string m_option_filteredChain_lag
 
std::string m_option_filteredChain_dataOutputFileName
 
std::string m_option_filteredChain_dataOutputFileType
 
std::string m_option_filteredChain_dataOutputAllowAll
 
std::string m_option_filteredChain_dataOutputAllowedSet
 
std::string m_option_filteredChain_computeStats
 
std::string m_option_displayCandidates
 
std::string m_option_putOutOfBoundsInChain
 
std::string m_option_tk_useLocalHessian
 
std::string m_option_tk_useNewtonComponent
 
std::string m_option_dr_maxNumExtraStages
 
std::string m_option_dr_listOfScalesForExtraStages
 
std::string m_option_dr_duringAmNonAdaptiveInt
 
std::string m_option_am_keepInitialMatrix
 
std::string m_option_am_initialNonAdaptInterval
 
std::string m_option_am_adaptInterval
 
std::string m_option_am_adaptedMatrices_dataOutputPeriod
 
std::string m_option_am_adaptedMatrices_dataOutputFileName
 
std::string m_option_am_adaptedMatrices_dataOutputFileType
 
std::string m_option_am_adaptedMatrices_dataOutputAllowAll
 
std::string m_option_am_adaptedMatrices_dataOutputAllowedSet
 
std::string m_option_am_eta
 See MhOptionsValues::m_amEta. More...
 
std::string m_option_am_epsilon
 See MhOptionsValues::m_amEpsilon. More...
 
std::string m_option_enableBrooksGelmanConvMonitor
 
std::string m_option_BrooksGelmanLag
 
std::string m_option_outputLogLikelihood
 
std::string m_option_outputLogTarget
 
std::string m_option_doLogitTransform
 
std::string m_option_algorithm
 
std::string m_option_tk
 
std::string m_option_updateInterval
 

Detailed Description

This class reads the options for the Metropolis-Hastings generator of samples from an input file.

This class implements a Metropolis-Hastings generator of samples. 'SG' stands for 'Sequence Generator'. Metropolis-Hastings generator of samples expects some options to be fully defined. This class reads the options for the Metropolis-Hastings generator of samples from an input file provided by the user. The class expects the prefix '<prefix>_mh_'. For instance, if 'prefix' is 'foo_775_fp_', then the constructor will read all options that begin with 'foo_775_fp_mh_'. Options reading is hpandled by class 'MetropolisHastingsOptions'. To set options by hand, use the MhOptionsValues class.

Definition at line 778 of file MetropolisHastingsSGOptions.h.

Constructor & Destructor Documentation

QUESO::MetropolisHastingsSGOptions::MetropolisHastingsSGOptions ( const BaseEnvironment env,
const char *  prefix 
)

Constructor: reads options from the input file.

Definition at line 837 of file MetropolisHastingsSGOptions.C.

References m_env, QUESO::BaseEnvironment::optionsInputFileName(), and QUESO::queso_require_not_equal_to_msg.

840  :
841 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
842  m_ov (NULL,NULL), // dakota
847 #else
848  m_ov (),
849 #endif
850  m_prefix ((std::string)(prefix) + "mh_"),
851  m_env (env),
852 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
853  m_optionsDesc (new boost::program_options::options_description("Bayesian Metropolis-Hastings options")),
854 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
855  m_option_help (m_prefix + "help" ),
856  m_option_dataOutputFileName (m_prefix + "dataOutputFileName" ),
857  m_option_dataOutputAllowAll (m_prefix + "dataOutputAllowAll" ),
858  m_option_dataOutputAllowedSet (m_prefix + "dataOutputAllowedSet" ),
859  m_option_totallyMute (m_prefix + "totallyMute" ),
860  m_option_initialPosition_dataInputFileName (m_prefix + "initialPosition_dataInputFileName" ),
861  m_option_initialPosition_dataInputFileType (m_prefix + "initialPosition_dataInputFileType" ),
862  m_option_initialProposalCovMatrix_dataInputFileName(m_prefix + "initialProposalCovMatrix_dataInputFileName"),
863  m_option_initialProposalCovMatrix_dataInputFileType(m_prefix + "initialProposalCovMatrix_dataInputFileType"),
864  m_option_listOfDisabledParameters (m_prefix + "listOfDisabledParameters" ),
865  m_option_rawChain_dataInputFileName (m_prefix + "rawChain_dataInputFileName" ),
866  m_option_rawChain_dataInputFileType (m_prefix + "rawChain_dataInputFileType" ),
867  m_option_rawChain_size (m_prefix + "rawChain_size" ),
868  m_option_rawChain_generateExtra (m_prefix + "rawChain_generateExtra" ),
869  m_option_rawChain_displayPeriod (m_prefix + "rawChain_displayPeriod" ),
870  m_option_rawChain_measureRunTimes (m_prefix + "rawChain_measureRunTimes" ),
871  m_option_rawChain_dataOutputPeriod (m_prefix + "rawChain_dataOutputPeriod" ),
872  m_option_rawChain_dataOutputFileName (m_prefix + "rawChain_dataOutputFileName" ),
873  m_option_rawChain_dataOutputFileType (m_prefix + "rawChain_dataOutputFileType" ),
874  m_option_rawChain_dataOutputAllowAll (m_prefix + "rawChain_dataOutputAllowAll" ),
875  m_option_rawChain_dataOutputAllowedSet (m_prefix + "rawChain_dataOutputAllowedSet" ),
876 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
877  m_option_rawChain_computeStats (m_prefix + "rawChain_computeStats" ),
878 #endif
879  m_option_filteredChain_generate (m_prefix + "filteredChain_generate" ),
880  m_option_filteredChain_discardedPortion (m_prefix + "filteredChain_discardedPortion" ),
881  m_option_filteredChain_lag (m_prefix + "filteredChain_lag" ),
882  m_option_filteredChain_dataOutputFileName (m_prefix + "filteredChain_dataOutputFileName" ),
883  m_option_filteredChain_dataOutputFileType (m_prefix + "filteredChain_dataOutputFileType" ),
884  m_option_filteredChain_dataOutputAllowAll (m_prefix + "filteredChain_dataOutputAllowAll" ),
885  m_option_filteredChain_dataOutputAllowedSet (m_prefix + "filteredChain_dataOutputAllowedSet" ),
886 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
887  m_option_filteredChain_computeStats (m_prefix + "filteredChain_computeStats" ),
888 #endif
889  m_option_displayCandidates (m_prefix + "displayCandidates" ),
890  m_option_putOutOfBoundsInChain (m_prefix + "putOutOfBoundsInChain" ),
891  m_option_tk_useLocalHessian (m_prefix + "tk_useLocalHessian" ),
892  m_option_tk_useNewtonComponent (m_prefix + "tk_useNewtonComponent" ),
893  m_option_dr_maxNumExtraStages (m_prefix + "dr_maxNumExtraStages" ),
894  m_option_dr_listOfScalesForExtraStages (m_prefix + "dr_listOfScalesForExtraStages" ),
895  m_option_dr_duringAmNonAdaptiveInt (m_prefix + "dr_duringAmNonAdaptiveInt" ),
896  m_option_am_keepInitialMatrix (m_prefix + "am_keepInitialMatrix" ),
897  m_option_am_initialNonAdaptInterval (m_prefix + "am_initialNonAdaptInterval" ),
898  m_option_am_adaptInterval (m_prefix + "am_adaptInterval" ),
899  m_option_am_adaptedMatrices_dataOutputPeriod (m_prefix + "am_adaptedMatrices_dataOutputPeriod" ),
900  m_option_am_adaptedMatrices_dataOutputFileName (m_prefix + "am_adaptedMatrices_dataOutputFileName" ),
901  m_option_am_adaptedMatrices_dataOutputFileType (m_prefix + "am_adaptedMatrices_dataOutputFileType" ),
902  m_option_am_adaptedMatrices_dataOutputAllowAll (m_prefix + "am_adaptedMatrices_dataOutputAllowAll" ),
903  m_option_am_adaptedMatrices_dataOutputAllowedSet (m_prefix + "am_adaptedMatrices_dataOutputAllowedSet" ),
904  m_option_am_eta (m_prefix + "am_eta" ),
905  m_option_am_epsilon (m_prefix + "am_epsilon" ),
906  m_option_enableBrooksGelmanConvMonitor (m_prefix + "enableBrooksGelmanConvMonitor" ),
907  m_option_BrooksGelmanLag (m_prefix + "BrooksGelmanLag" ),
908  m_option_outputLogLikelihood (m_prefix + "outputLogLikelihood" ),
909  m_option_outputLogTarget (m_prefix + "outputLogTarget" ),
910  m_option_doLogitTransform (m_prefix + "doLogitTransform" ),
911  m_option_algorithm (m_prefix + "algorithm" ),
912  m_option_tk (m_prefix + "tk" ),
913  m_option_updateInterval (m_prefix + "updateInterval" )
914 {
915  queso_deprecated();
916 
917  queso_require_not_equal_to_msg(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the absence of an options input file"));
918 }
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix queso_require_not_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the absence of an options input file"))
std::string m_option_am_epsilon
See MhOptionsValues::m_amEpsilon.
SequenceStatisticalOptions * m_filteredChainStatisticalOptionsObj
MhOptionsValues m_ov
This class is where the actual options are stored.
std::string m_option_am_eta
See MhOptionsValues::m_amEta.
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
Definition: Environment.C:354
ScopedPtr< boost::program_options::options_description >::Type m_optionsDesc
SequenceStatisticalOptions * m_rawChainStatisticalOptionsObj
QUESO::MetropolisHastingsSGOptions::MetropolisHastingsSGOptions ( const BaseEnvironment env,
const char *  prefix,
const MhOptionsValues alternativeOptionsValues 
)

Constructor: with alternative option values.

In this constructor, the input options are given by alternativeOptionsValues.

Definition at line 920 of file MetropolisHastingsSGOptions.C.

References QUESO::MhOptionsValues::m_alternativeFilteredSsOptionsValues, QUESO::MhOptionsValues::m_alternativeRawSsOptionsValues, m_env, QUESO::MhOptionsValues::m_filteredChainComputeStats, m_filteredChainStatisticalOptionsObj, m_filteredChainStatOptsInstantiated, m_ov, m_prefix, QUESO::MhOptionsValues::m_rawChainComputeStats, m_rawChainStatisticalOptionsObj, m_rawChainStatOptsInstantiated, QUESO::MhOptionsValues::m_totallyMute, QUESO::BaseEnvironment::optionsInputFileName(), QUESO::queso_require_equal_to_msg, and QUESO::BaseEnvironment::subDisplayFile().

924  :
925  m_ov (alternativeOptionsValues),
926 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
931 #endif
932  m_prefix ((std::string)(prefix) + "mh_"),
933  m_env (env),
934 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
935  m_optionsDesc (),
936 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
937  m_option_help (m_prefix + "help" ),
938  m_option_dataOutputFileName (m_prefix + "dataOutputFileName" ),
939  m_option_dataOutputAllowAll (m_prefix + "dataOutputAllowAll" ),
940  m_option_dataOutputAllowedSet (m_prefix + "dataOutputAllowedSet" ),
941  m_option_totallyMute (m_prefix + "totallyMute" ),
942  m_option_initialPosition_dataInputFileName (m_prefix + "initialPosition_dataInputFileName" ),
943  m_option_initialPosition_dataInputFileType (m_prefix + "initialPosition_dataInputFileType" ),
944  m_option_initialProposalCovMatrix_dataInputFileName(m_prefix + "initialProposalCovMatrix_dataInputFileName"),
945  m_option_initialProposalCovMatrix_dataInputFileType(m_prefix + "initialProposalCovMatrix_dataInputFileType"),
946  m_option_listOfDisabledParameters (m_prefix + "listOfDisabledParameters" ),
947  m_option_rawChain_dataInputFileName (m_prefix + "rawChain_dataInputFileName" ),
948  m_option_rawChain_dataInputFileType (m_prefix + "rawChain_dataInputFileType" ),
949  m_option_rawChain_size (m_prefix + "rawChain_size" ),
950  m_option_rawChain_generateExtra (m_prefix + "rawChain_generateExtra" ),
951  m_option_rawChain_displayPeriod (m_prefix + "rawChain_displayPeriod" ),
952  m_option_rawChain_measureRunTimes (m_prefix + "rawChain_measureRunTimes" ),
953  m_option_rawChain_dataOutputPeriod (m_prefix + "rawChain_dataOutputPeriod" ),
954  m_option_rawChain_dataOutputFileName (m_prefix + "rawChain_dataOutputFileName" ),
955  m_option_rawChain_dataOutputFileType (m_prefix + "rawChain_dataOutputFileType" ),
956  m_option_rawChain_dataOutputAllowAll (m_prefix + "rawChain_dataOutputAllowAll" ),
957  m_option_rawChain_dataOutputAllowedSet (m_prefix + "rawChain_dataOutputAllowedSet" ),
958 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
959  m_option_rawChain_computeStats (m_prefix + "rawChain_computeStats" ),
960 #endif
961  m_option_filteredChain_generate (m_prefix + "filteredChain_generate" ),
962  m_option_filteredChain_discardedPortion (m_prefix + "filteredChain_discardedPortion" ),
963  m_option_filteredChain_lag (m_prefix + "filteredChain_lag" ),
964  m_option_filteredChain_dataOutputFileName (m_prefix + "filteredChain_dataOutputFileName" ),
965  m_option_filteredChain_dataOutputFileType (m_prefix + "filteredChain_dataOutputFileType" ),
966  m_option_filteredChain_dataOutputAllowAll (m_prefix + "filteredChain_dataOutputAllowAll" ),
967  m_option_filteredChain_dataOutputAllowedSet (m_prefix + "filteredChain_dataOutputAllowedSet" ),
968 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
969  m_option_filteredChain_computeStats (m_prefix + "filteredChain_computeStats" ),
970 #endif
971  m_option_displayCandidates (m_prefix + "displayCandidates" ),
972  m_option_putOutOfBoundsInChain (m_prefix + "putOutOfBoundsInChain" ),
973  m_option_tk_useLocalHessian (m_prefix + "tk_useLocalHessian" ),
974  m_option_tk_useNewtonComponent (m_prefix + "tk_useNewtonComponent" ),
975  m_option_dr_maxNumExtraStages (m_prefix + "dr_maxNumExtraStages" ),
976  m_option_dr_listOfScalesForExtraStages (m_prefix + "dr_listOfScalesForExtraStages" ),
977  m_option_dr_duringAmNonAdaptiveInt (m_prefix + "dr_duringAmNonAdaptiveInt" ),
978  m_option_am_keepInitialMatrix (m_prefix + "am_keepInitialMatrix" ),
979  m_option_am_initialNonAdaptInterval (m_prefix + "am_initialNonAdaptInterval" ),
980  m_option_am_adaptInterval (m_prefix + "am_adaptInterval" ),
981  m_option_am_adaptedMatrices_dataOutputPeriod (m_prefix + "am_adaptedMatrices_dataOutputPeriod" ),
982  m_option_am_adaptedMatrices_dataOutputFileName (m_prefix + "am_adaptedMatrices_dataOutputFileName" ),
983  m_option_am_adaptedMatrices_dataOutputFileType (m_prefix + "am_adaptedMatrices_dataOutputFileType" ),
984  m_option_am_adaptedMatrices_dataOutputAllowAll (m_prefix + "am_adaptedMatrices_dataOutputAllowAll" ),
985  m_option_am_adaptedMatrices_dataOutputAllowedSet (m_prefix + "am_adaptedMatrices_dataOutputAllowedSet" ),
986  m_option_am_eta (m_prefix + "am_eta" ),
987  m_option_am_epsilon (m_prefix + "am_epsilon" ),
988  m_option_enableBrooksGelmanConvMonitor (m_prefix + "enableBrooksGelmanConvMonitor" ),
989  m_option_BrooksGelmanLag (m_prefix + "BrooksGelmanLag" ),
990  m_option_outputLogLikelihood (m_prefix + "outputLogLikelihood" ),
991  m_option_outputLogTarget (m_prefix + "outputLogTarget" ),
992  m_option_doLogitTransform (m_prefix + "doLogitTransform" ),
993  m_option_algorithm (m_prefix + "algorithm" ),
994  m_option_tk (m_prefix + "tk" ),
995  m_option_updateInterval (m_prefix + "updateInterval" )
996 {
997  queso_deprecated();
998 
999  queso_require_equal_to_msg(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"));
1000 
1001  if ((m_env.subDisplayFile() != NULL ) &&
1002  (m_ov.m_totallyMute == false)) {
1003  *m_env.subDisplayFile() << "In MetropolisHastingsSGOptions::constructor(2)"
1004  << ": after setting values of options with prefix '" << m_prefix
1005  << "', state of object is:"
1006  << "\n" << *this
1007  << std::endl;
1008  }
1009 
1010 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1014  }
1018  }
1019 #endif
1020 }
std::string m_option_am_epsilon
See MhOptionsValues::m_amEpsilon.
SequenceStatisticalOptions * m_filteredChainStatisticalOptionsObj
MhOptionsValues m_ov
This class is where the actual options are stored.
std::string m_option_am_eta
See MhOptionsValues::m_amEta.
std::string optionsInputFileName() const
Access to the attribute m_optionsInputFileName, which stores the name of the input file passed by the...
Definition: Environment.C:354
bool m_rawChainComputeStats
Flag to tell QUESO whether or not to compute chain statistics. Default is false.
A templated class that stores statistical options (optionally read from an input file) ...
SsOptionsValues m_alternativeRawSsOptionsValues
ScopedPtr< boost::program_options::options_description >::Type m_optionsDesc
bool m_filteredChainComputeStats
Toggle to tell QUESO whether or not to compute statistics on the filtered chain. Default is false...
SsOptionsValues m_alternativeFilteredSsOptionsValues
MonteCarloSGOptions::MonteCarloSGOptions(const BaseEnvironment &env, const char *prefix, const McOptionsValues &alternativeOptionsValues queso_require_equal_to_msg)(m_env.optionsInputFileName(), std::string(""), std::string("this constructor is incompatible with the existence of an options input file"))
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:320
SequenceStatisticalOptions * m_rawChainStatisticalOptionsObj
bool m_totallyMute
If true, zero output is written to files. Default is false.
QUESO::MetropolisHastingsSGOptions::MetropolisHastingsSGOptions ( const MLSamplingLevelOptions mlOptions)

Copy constructor.

Definition at line 1022 of file MetropolisHastingsSGOptions.C.

References QUESO::MLSamplingLevelOptions::m_algorithm, QUESO::MhOptionsValues::m_algorithm, QUESO::MLSamplingLevelOptions::m_amAdaptedMatricesDataOutputAllowAll, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputAllowAll, QUESO::MLSamplingLevelOptions::m_amAdaptedMatricesDataOutputAllowedSet, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputAllowedSet, QUESO::MLSamplingLevelOptions::m_amAdaptedMatricesDataOutputFileName, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputFileName, QUESO::MLSamplingLevelOptions::m_amAdaptedMatricesDataOutputFileType, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputFileType, QUESO::MLSamplingLevelOptions::m_amAdaptedMatricesDataOutputPeriod, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputPeriod, QUESO::MLSamplingLevelOptions::m_amAdaptInterval, QUESO::MhOptionsValues::m_amAdaptInterval, QUESO::MLSamplingLevelOptions::m_amEpsilon, QUESO::MhOptionsValues::m_amEpsilon, QUESO::MLSamplingLevelOptions::m_amEta, QUESO::MhOptionsValues::m_amEta, QUESO::MLSamplingLevelOptions::m_amInitialNonAdaptInterval, QUESO::MhOptionsValues::m_amInitialNonAdaptInterval, QUESO::MLSamplingLevelOptions::m_amKeepInitialMatrix, QUESO::MhOptionsValues::m_amKeepInitialMatrix, QUESO::MhOptionsValues::m_BrooksGelmanLag, QUESO::MLSamplingLevelOptions::m_dataOutputAllowAll, QUESO::MhOptionsValues::m_dataOutputAllowAll, QUESO::MLSamplingLevelOptions::m_dataOutputAllowedSet, QUESO::MhOptionsValues::m_dataOutputAllowedSet, QUESO::MLSamplingLevelOptions::m_dataOutputFileName, QUESO::MhOptionsValues::m_dataOutputFileName, QUESO::MLSamplingLevelOptions::m_displayCandidates, QUESO::MhOptionsValues::m_displayCandidates, QUESO::MLSamplingLevelOptions::m_doLogitTransform, QUESO::MhOptionsValues::m_doLogitTransform, QUESO::MLSamplingLevelOptions::m_drDuringAmNonAdaptiveInt, QUESO::MhOptionsValues::m_drDuringAmNonAdaptiveInt, QUESO::MLSamplingLevelOptions::m_drMaxNumExtraStages, QUESO::MhOptionsValues::m_drMaxNumExtraStages, QUESO::MLSamplingLevelOptions::m_drScalesForExtraStages, QUESO::MhOptionsValues::m_drScalesForExtraStages, QUESO::MhOptionsValues::m_enableBrooksGelmanConvMonitor, m_env, QUESO::MLSamplingLevelOptions::m_filteredChainComputeStats, QUESO::MhOptionsValues::m_filteredChainComputeStats, QUESO::MLSamplingLevelOptions::m_filteredChainDataOutputAllowAll, QUESO::MhOptionsValues::m_filteredChainDataOutputAllowAll, QUESO::MLSamplingLevelOptions::m_filteredChainDataOutputAllowedSet, QUESO::MhOptionsValues::m_filteredChainDataOutputAllowedSet, QUESO::MLSamplingLevelOptions::m_filteredChainDataOutputFileName, QUESO::MhOptionsValues::m_filteredChainDataOutputFileName, QUESO::MLSamplingLevelOptions::m_filteredChainDataOutputFileType, QUESO::MhOptionsValues::m_filteredChainDataOutputFileType, QUESO::MLSamplingLevelOptions::m_filteredChainDiscardedPortion, QUESO::MhOptionsValues::m_filteredChainDiscardedPortion, QUESO::MLSamplingLevelOptions::m_filteredChainGenerate, QUESO::MhOptionsValues::m_filteredChainGenerate, QUESO::MLSamplingLevelOptions::m_filteredChainLag, QUESO::MhOptionsValues::m_filteredChainLag, QUESO::MLSamplingLevelOptions::m_filteredChainStatisticalOptionsObj, m_filteredChainStatisticalOptionsObj, m_filteredChainStatOptsInstantiated, QUESO::MhOptionsValues::m_initialPositionDataInputFileName, QUESO::MLSamplingLevelOptions::m_initialPositionDataInputFileName, QUESO::MhOptionsValues::m_initialPositionDataInputFileType, QUESO::MLSamplingLevelOptions::m_initialPositionDataInputFileType, QUESO::MLSamplingLevelOptions::m_initialProposalCovMatrixDataInputFileName, QUESO::MhOptionsValues::m_initialProposalCovMatrixDataInputFileName, QUESO::MLSamplingLevelOptions::m_initialProposalCovMatrixDataInputFileType, QUESO::MhOptionsValues::m_initialProposalCovMatrixDataInputFileType, QUESO::MhOptionsValues::m_outputLogLikelihood, QUESO::MhOptionsValues::m_outputLogTarget, m_ov, QUESO::MLSamplingLevelOptions::m_parameterDisabledSet, QUESO::MhOptionsValues::m_parameterDisabledSet, m_prefix, QUESO::MLSamplingLevelOptions::m_putOutOfBoundsInChain, QUESO::MhOptionsValues::m_putOutOfBoundsInChain, QUESO::MLSamplingLevelOptions::m_rawChainComputeStats, QUESO::MhOptionsValues::m_rawChainComputeStats, QUESO::MLSamplingLevelOptions::m_rawChainDataInputFileName, QUESO::MhOptionsValues::m_rawChainDataInputFileName, QUESO::MLSamplingLevelOptions::m_rawChainDataInputFileType, QUESO::MhOptionsValues::m_rawChainDataInputFileType, QUESO::MLSamplingLevelOptions::m_rawChainDataOutputAllowAll, QUESO::MhOptionsValues::m_rawChainDataOutputAllowAll, QUESO::MLSamplingLevelOptions::m_rawChainDataOutputAllowedSet, QUESO::MhOptionsValues::m_rawChainDataOutputAllowedSet, QUESO::MLSamplingLevelOptions::m_rawChainDataOutputFileName, QUESO::MhOptionsValues::m_rawChainDataOutputFileName, QUESO::MLSamplingLevelOptions::m_rawChainDataOutputFileType, QUESO::MhOptionsValues::m_rawChainDataOutputFileType, QUESO::MLSamplingLevelOptions::m_rawChainDataOutputPeriod, QUESO::MhOptionsValues::m_rawChainDataOutputPeriod, QUESO::MLSamplingLevelOptions::m_rawChainDisplayPeriod, QUESO::MhOptionsValues::m_rawChainDisplayPeriod, QUESO::MLSamplingLevelOptions::m_rawChainGenerateExtra, QUESO::MhOptionsValues::m_rawChainGenerateExtra, QUESO::MLSamplingLevelOptions::m_rawChainMeasureRunTimes, QUESO::MhOptionsValues::m_rawChainMeasureRunTimes, QUESO::MLSamplingLevelOptions::m_rawChainSize, QUESO::MhOptionsValues::m_rawChainSize, QUESO::MLSamplingLevelOptions::m_rawChainStatisticalOptionsObj, m_rawChainStatisticalOptionsObj, m_rawChainStatOptsInstantiated, QUESO::MLSamplingLevelOptions::m_tk, QUESO::MhOptionsValues::m_tk, QUESO::MLSamplingLevelOptions::m_tkUseLocalHessian, QUESO::MhOptionsValues::m_tkUseLocalHessian, QUESO::MLSamplingLevelOptions::m_tkUseNewtonComponent, QUESO::MhOptionsValues::m_tkUseNewtonComponent, QUESO::MhOptionsValues::m_totallyMute, QUESO::MLSamplingLevelOptions::m_totallyMute, QUESO::MLSamplingLevelOptions::m_updateInterval, QUESO::MhOptionsValues::m_updateInterval, and QUESO::BaseEnvironment::subDisplayFile().

1024  :
1025 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1026  m_ov (NULL,NULL), // dakota
1031 #else
1032  m_ov (),
1033 #endif
1034  m_prefix (mlOptions.m_prefix),
1035  m_env (mlOptions.env()),
1036 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
1037  m_optionsDesc (),
1038 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
1039  m_option_help (m_prefix + "help" ),
1040  m_option_dataOutputFileName (m_prefix + "dataOutputFileName" ),
1041  m_option_dataOutputAllowAll (m_prefix + "dataOutputAllowAll" ),
1042  m_option_dataOutputAllowedSet (m_prefix + "dataOutputAllowedSet" ),
1043  m_option_totallyMute (m_prefix + "totallyMute" ),
1044  m_option_initialPosition_dataInputFileName (m_prefix + "initialPosition_dataInputFileName" ),
1045  m_option_initialPosition_dataInputFileType (m_prefix + "initialPosition_dataInputFileType" ),
1046  m_option_initialProposalCovMatrix_dataInputFileName(m_prefix + "initialProposalCovMatrix_dataInputFileName"),
1047  m_option_initialProposalCovMatrix_dataInputFileType(m_prefix + "initialProposalCovMatrix_dataInputFileType"),
1048  m_option_listOfDisabledParameters (m_prefix + "listOfDisabledParameters" ),
1049  m_option_rawChain_dataInputFileName (m_prefix + "rawChain_dataInputFileName" ),
1050  m_option_rawChain_dataInputFileType (m_prefix + "rawChain_dataInputFileType" ),
1051  m_option_rawChain_size (m_prefix + "rawChain_size" ),
1052  m_option_rawChain_generateExtra (m_prefix + "rawChain_generateExtra" ),
1053  m_option_rawChain_displayPeriod (m_prefix + "rawChain_displayPeriod" ),
1054  m_option_rawChain_measureRunTimes (m_prefix + "rawChain_measureRunTimes" ),
1055  m_option_rawChain_dataOutputPeriod (m_prefix + "rawChain_dataOutputPeriod" ),
1056  m_option_rawChain_dataOutputFileName (m_prefix + "rawChain_dataOutputFileName" ),
1057  m_option_rawChain_dataOutputFileType (m_prefix + "rawChain_dataOutputFileType" ),
1058  m_option_rawChain_dataOutputAllowAll (m_prefix + "rawChain_dataOutputAllowAll" ),
1059  m_option_rawChain_dataOutputAllowedSet (m_prefix + "rawChain_dataOutputAllowedSet" ),
1060 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1061  m_option_rawChain_computeStats (m_prefix + "rawChain_computeStats" ),
1062 #endif
1063  m_option_filteredChain_generate (m_prefix + "filteredChain_generate" ),
1064  m_option_filteredChain_discardedPortion (m_prefix + "filteredChain_discardedPortion" ),
1065  m_option_filteredChain_lag (m_prefix + "filteredChain_lag" ),
1066  m_option_filteredChain_dataOutputFileName (m_prefix + "filteredChain_dataOutputFileName" ),
1067  m_option_filteredChain_dataOutputFileType (m_prefix + "filteredChain_dataOutputFileType" ),
1068  m_option_filteredChain_dataOutputAllowAll (m_prefix + "filteredChain_dataOutputAllowAll" ),
1069  m_option_filteredChain_dataOutputAllowedSet (m_prefix + "filteredChain_dataOutputAllowedSet" ),
1070 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1071  m_option_filteredChain_computeStats (m_prefix + "filteredChain_computeStats" ),
1072 #endif
1073  m_option_displayCandidates (m_prefix + "displayCandidates" ),
1074  m_option_putOutOfBoundsInChain (m_prefix + "putOutOfBoundsInChain" ),
1075  m_option_tk_useLocalHessian (m_prefix + "tk_useLocalHessian" ),
1076  m_option_tk_useNewtonComponent (m_prefix + "tk_useNewtonComponent" ),
1077  m_option_dr_maxNumExtraStages (m_prefix + "dr_maxNumExtraStages" ),
1078  m_option_dr_listOfScalesForExtraStages (m_prefix + "dr_listOfScalesForExtraStages" ),
1079  m_option_dr_duringAmNonAdaptiveInt (m_prefix + "dr_duringAmNonAdaptiveInt" ),
1080  m_option_am_keepInitialMatrix (m_prefix + "am_keepInitialMatrix" ),
1081  m_option_am_initialNonAdaptInterval (m_prefix + "am_initialNonAdaptInterval" ),
1082  m_option_am_adaptInterval (m_prefix + "am_adaptInterval" ),
1083  m_option_am_adaptedMatrices_dataOutputPeriod (m_prefix + "am_adaptedMatrices_dataOutputPeriod" ),
1084  m_option_am_adaptedMatrices_dataOutputFileName (m_prefix + "am_adaptedMatrices_dataOutputFileName" ),
1085  m_option_am_adaptedMatrices_dataOutputFileType (m_prefix + "am_adaptedMatrices_dataOutputFileType" ),
1086  m_option_am_adaptedMatrices_dataOutputAllowAll (m_prefix + "am_adaptedMatrices_dataOutputAllowAll" ),
1087  m_option_am_adaptedMatrices_dataOutputAllowedSet (m_prefix + "am_adaptedMatrices_dataOutputAllowedSet" ),
1088  m_option_am_eta (m_prefix + "am_eta" ),
1089  m_option_am_epsilon (m_prefix + "am_epsilon" ),
1090  m_option_enableBrooksGelmanConvMonitor (m_prefix + "enableBrooksGelmanConvMonitor" ),
1091  m_option_BrooksGelmanLag (m_prefix + "BrooksGelmanLag" ),
1092  m_option_outputLogLikelihood (m_prefix + "outputLogLikelihood" ),
1093  m_option_outputLogTarget (m_prefix + "outputLogTarget" ),
1094  m_option_doLogitTransform (m_prefix + "doLogitTransform" ),
1095  m_option_algorithm (m_prefix + "algorithm" ),
1096  m_option_tk (m_prefix + "tk" ),
1097  m_option_updateInterval (m_prefix + "updateInterval" )
1098 {
1099  queso_deprecated();
1100 
1101  m_ov.m_dataOutputFileName = mlOptions.m_dataOutputFileName;
1102  m_ov.m_dataOutputAllowAll = mlOptions.m_dataOutputAllowAll;
1103  m_ov.m_dataOutputAllowedSet = mlOptions.m_dataOutputAllowedSet;
1104  m_ov.m_totallyMute = mlOptions.m_totallyMute;
1105  m_ov.m_initialPositionDataInputFileName = mlOptions.m_initialPositionDataInputFileName;
1106  m_ov.m_initialPositionDataInputFileType = mlOptions.m_initialPositionDataInputFileType;
1107  m_ov.m_initialProposalCovMatrixDataInputFileName = mlOptions.m_initialProposalCovMatrixDataInputFileName;
1108  m_ov.m_initialProposalCovMatrixDataInputFileType = mlOptions.m_initialProposalCovMatrixDataInputFileType;
1109  m_ov.m_parameterDisabledSet = mlOptions.m_parameterDisabledSet;
1110  m_ov.m_rawChainDataInputFileName = mlOptions.m_rawChainDataInputFileName;
1111  m_ov.m_rawChainDataInputFileType = mlOptions.m_rawChainDataInputFileType;
1112  m_ov.m_rawChainSize = mlOptions.m_rawChainSize;
1113  m_ov.m_rawChainGenerateExtra = mlOptions.m_rawChainGenerateExtra;
1114  m_ov.m_rawChainDisplayPeriod = mlOptions.m_rawChainDisplayPeriod;
1115  m_ov.m_rawChainMeasureRunTimes = mlOptions.m_rawChainMeasureRunTimes;
1116  m_ov.m_rawChainDataOutputPeriod = mlOptions.m_rawChainDataOutputPeriod;
1117  m_ov.m_rawChainDataOutputFileName = mlOptions.m_rawChainDataOutputFileName;
1118  m_ov.m_rawChainDataOutputFileType = mlOptions.m_rawChainDataOutputFileType;
1119  m_ov.m_rawChainDataOutputAllowAll = mlOptions.m_rawChainDataOutputAllowAll;
1120  m_ov.m_rawChainDataOutputAllowedSet = mlOptions.m_rawChainDataOutputAllowedSet;
1121 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1122  m_ov.m_rawChainComputeStats = mlOptions.m_rawChainComputeStats;
1123 #endif
1124  m_ov.m_filteredChainGenerate = mlOptions.m_filteredChainGenerate;
1125  m_ov.m_filteredChainDiscardedPortion = mlOptions.m_filteredChainDiscardedPortion;
1126  m_ov.m_filteredChainLag = mlOptions.m_filteredChainLag;
1127  m_ov.m_filteredChainDataOutputFileName = mlOptions.m_filteredChainDataOutputFileName;
1128  m_ov.m_filteredChainDataOutputFileType = mlOptions.m_filteredChainDataOutputFileType;
1129  m_ov.m_filteredChainDataOutputAllowAll = mlOptions.m_filteredChainDataOutputAllowAll;
1130  m_ov.m_filteredChainDataOutputAllowedSet = mlOptions.m_filteredChainDataOutputAllowedSet;
1131 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1132  m_ov.m_filteredChainComputeStats = mlOptions.m_filteredChainComputeStats;
1133 #endif
1134  m_ov.m_displayCandidates = mlOptions.m_displayCandidates;
1135  m_ov.m_putOutOfBoundsInChain = mlOptions.m_putOutOfBoundsInChain;
1136  m_ov.m_tkUseLocalHessian = mlOptions.m_tkUseLocalHessian;
1137  m_ov.m_tkUseNewtonComponent = mlOptions.m_tkUseNewtonComponent;
1138  m_ov.m_drMaxNumExtraStages = mlOptions.m_drMaxNumExtraStages;
1139  m_ov.m_drScalesForExtraStages = mlOptions.m_drScalesForExtraStages;
1140  m_ov.m_drDuringAmNonAdaptiveInt = mlOptions.m_drDuringAmNonAdaptiveInt;
1141  m_ov.m_amKeepInitialMatrix = mlOptions.m_amKeepInitialMatrix;
1142  m_ov.m_amInitialNonAdaptInterval = mlOptions.m_amInitialNonAdaptInterval;
1143  m_ov.m_amAdaptInterval = mlOptions.m_amAdaptInterval;
1144  m_ov.m_amAdaptedMatricesDataOutputPeriod = mlOptions.m_amAdaptedMatricesDataOutputPeriod;
1145  m_ov.m_amAdaptedMatricesDataOutputFileName = mlOptions.m_amAdaptedMatricesDataOutputFileName;
1146  m_ov.m_amAdaptedMatricesDataOutputFileType = mlOptions.m_amAdaptedMatricesDataOutputFileType;
1147  m_ov.m_amAdaptedMatricesDataOutputAllowAll = mlOptions.m_amAdaptedMatricesDataOutputAllowAll;
1148  m_ov.m_amAdaptedMatricesDataOutputAllowedSet = mlOptions.m_amAdaptedMatricesDataOutputAllowedSet;
1149  m_ov.m_amEta = mlOptions.m_amEta;
1150  m_ov.m_amEpsilon = mlOptions.m_amEpsilon;
1151  m_ov.m_enableBrooksGelmanConvMonitor = UQ_MH_SG_ENABLE_BROOKS_GELMAN_CONV_MONITOR;
1152  m_ov.m_BrooksGelmanLag = UQ_MH_SG_BROOKS_GELMAN_LAG;
1153  m_ov.m_outputLogLikelihood = UQ_MH_SG_OUTPUT_LOG_LIKELIHOOD;
1154  m_ov.m_outputLogTarget = UQ_MH_SG_OUTPUT_LOG_TARGET;
1155  m_ov.m_doLogitTransform = mlOptions.m_doLogitTransform;
1156  m_ov.m_algorithm = mlOptions.m_algorithm;
1157  m_ov.m_tk = mlOptions.m_tk;
1158  m_ov.m_updateInterval = mlOptions.m_updateInterval;
1159 
1160 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1161 //m_ov.m_alternativeRawSsOptionsValues = mlOptions.; // dakota
1162 //m_ov.m_alternativeFilteredSsOptionsValues = mlOptions.; // dakota
1163 #endif
1164 
1165 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1166  m_rawChainStatisticalOptionsObj = mlOptions.m_rawChainStatisticalOptionsObj; // dakota
1168  m_filteredChainStatisticalOptionsObj = mlOptions.m_filteredChainStatisticalOptionsObj; // dakota
1170 #endif
1171  if ((m_env.subDisplayFile() != NULL ) &&
1172  (m_ov.m_totallyMute == false)) {
1173  *m_env.subDisplayFile() << "In MetropolisHastingsSGOptions::constructor(3)"
1174  << ": after copying values of options with prefix '" << m_prefix
1175  << "', state of object is:"
1176  << "\n" << *this
1177  << std::endl;
1178  }
1179 }
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
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.
unsigned int m_amAdaptedMatricesDataOutputPeriod
The frequency (after m_amInitialNonAdaptInterval samples are done) of printing the last adapted propo...
bool m_doLogitTransform
Flag for deciding whether or not to do logit transform of bounded domains Default is true...
std::vector< double > m_drScalesForExtraStages
The vector of scale factors for the proposal covariance matrix to use for delayed rejection...
unsigned int m_amAdaptInterval
The frequency at which to adapt the proposal covariance matrix.
bool m_dataOutputAllowAll
If true, all processes write output and m_dataOutputAllowedSet is ignored.
std::string m_option_am_epsilon
See MhOptionsValues::m_amEpsilon.
double m_filteredChainDiscardedPortion
What initial fraction of the filtered chain is discarded.
bool m_drDuringAmNonAdaptiveInt
Do delayed rejection during the initial non-adaptive part of sampling?
bool m_rawChainGenerateExtra
If true, extra chain information is computed/stored.
SequenceStatisticalOptions * m_filteredChainStatisticalOptionsObj
std::string m_amAdaptedMatricesDataOutputFileType
The filetype of m_amAdaptedMatricesDataOutputFileName. Only &quot;m&quot; (matlab) is currently supported...
std::set< unsigned int > m_amAdaptedMatricesDataOutputAllowedSet
This option is a no-op. The default is the empty set.
MhOptionsValues m_ov
This class is where the actual options are stored.
unsigned int m_filteredChainLag
Set the lag for the filtered chain. Default is 1.
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_dataOutputAllowedSet
The set of MPI ranks that can write output. See m_dataOutputAllowAll.
std::string m_option_am_eta
See MhOptionsValues::m_amEta.
bool m_amAdaptedMatricesDataOutputAllowAll
This option is a no-op. The default is false.
std::string m_algorithm
Which algorithm to use for the MCMC. Default is &quot;random_walk&quot;.
double m_amEpsilon
Regularisation parameter for the DRAM covariance matrix.
bool m_outputLogLikelihood
Flag for deciding whether or not to dump log likelihood values in output. Default is true...
unsigned int m_drMaxNumExtraStages
The number of delayed rejection stages to do. Default is 0.
bool m_rawChainComputeStats
Flag to tell QUESO whether or not to compute chain statistics. Default is false.
std::string m_rawChainDataInputFileType
The filetype of m_rawChainDataInputFileName. Only &quot;m&quot; (matlab) is currently supported. Default is &quot;m&quot;.
std::set< unsigned int > m_rawChainDataOutputAllowedSet
The set of MPI ranks that will write Markov chain output to a file. See also m_rawChainDataOutputAllo...
std::string m_rawChainDataOutputFileName
If not &quot;.&quot;, filename to write the Markov chain to.
unsigned int m_rawChainDataOutputPeriod
The frequency with which to write chain output. Defaults to 0.
bool m_amKeepInitialMatrix
This option is a no-op. The default is false.
std::string m_tk
Which transition kernel to use for MCMC. Default is &quot;random_walk&quot;.
bool m_displayCandidates
Toggle to tell QUESO whether or not to write proposal (candidate) state to output file...
unsigned int m_amInitialNonAdaptInterval
The number of initial samples to do without adapting the proposal covariance matrix.
std::string m_initialPositionDataInputFileName
If not &quot;.&quot;, reads the contents of the file and uses that to start the MCMC. Default is &quot;...
bool m_rawChainDataOutputAllowAll
Toggle for whether or not to allow all processes to write Markov chain output to a file...
std::string m_rawChainDataOutputFileType
The filetype of m_rawChainDataOutputFileName.
unsigned int m_rawChainSize
The size of the chain (number of posterior samples) to generate. Default is 100.
std::string m_initialProposalCovMatrixDataInputFileName
If not &quot;.&quot;, reads the contents of the file as the initial proposal covariance matrix.
unsigned int m_updateInterval
How often to call the TK&#39;s updateTK method. Default is 1.
unsigned int m_enableBrooksGelmanConvMonitor
The frequency with which to compute the Brooks-Gelman convergence statistic.
bool m_outputLogTarget
Flag for deciding whether or not to dump log target values in output Default is true.
unsigned int m_rawChainDisplayPeriod
The frequency with which to output diagnostic information.
bool m_tkUseLocalHessian
Flag to tell QUESO whether or not to use Hessian information for the proposal covariance matrix...
ScopedPtr< boost::program_options::options_description >::Type m_optionsDesc
bool m_filteredChainComputeStats
Toggle to tell QUESO whether or not to compute statistics on the filtered chain. Default is false...
std::string m_dataOutputFileName
The base name of output files where the chain (and related information) will be written.
std::string m_filteredChainDataOutputFileType
The filetype of m_filteredChainDataOutputFileName. Only &quot;m&quot; (matlab) is currently supported...
bool m_rawChainMeasureRunTimes
If true, measures timings spent in various chain computions and writes them to the output file...
bool m_filteredChainGenerate
Toggle the option to save a filtered chain.
bool m_filteredChainDataOutputAllowAll
Toggle for whether or not to allow all processes to write filtered Markov chain output to a file...
bool m_putOutOfBoundsInChain
Flag to tell QUESO how chains should be upon generating a proposal that is out of the problem domain...
double m_amEta
Proposal covariance scaling factor, usually 2.4 * 2.4 / d.
std::set< unsigned int > m_parameterDisabledSet
Set of parameters that don&#39;t get sampled.
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:320
std::string m_amAdaptedMatricesDataOutputFileName
If not &quot;.&quot;, this is the file to write adapted proposal covariance matrices to. Default is &quot;...
SequenceStatisticalOptions * m_rawChainStatisticalOptionsObj
bool m_totallyMute
If true, zero output is written to files. Default is false.
std::string m_initialProposalCovMatrixDataInputFileType
The filetype of m_initialProposalCovMatrixDataInputFileName. Only &quot;m&quot; (matlab) is currently supported...
bool m_tkUseNewtonComponent
This option is a no-op. Default is true.
unsigned int m_BrooksGelmanLag
The lag with which to compute the Brooks-Gelman convergence statistic.
QUESO::MetropolisHastingsSGOptions::~MetropolisHastingsSGOptions ( )

Destructor.

Definition at line 1181 of file MetropolisHastingsSGOptions.C.

References m_filteredChainStatisticalOptionsObj, m_filteredChainStatOptsInstantiated, m_rawChainStatisticalOptionsObj, and m_rawChainStatOptsInstantiated.

1182 {
1183  queso_deprecated();
1184 
1185 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1188 #endif
1189 }
SequenceStatisticalOptions * m_filteredChainStatisticalOptionsObj
SequenceStatisticalOptions * m_rawChainStatisticalOptionsObj

Member Function Documentation

void QUESO::MetropolisHastingsSGOptions::defineMyOptions ( boost::program_options::options_description &  optionsDesc) const
private

Defines the options for the Metropolis-Hastings generator of samples as the default options.

Definition at line 1319 of file MetropolisHastingsSGOptions.C.

Referenced by scanOptionsValues().

1320 {
1321  queso_deprecated();
1322 
1323  optionsDesc.add_options()
1324  (m_option_help.c_str(), "produce help msg for Bayesian Metropolis-Hastings" )
1325  (m_option_dataOutputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_DATA_OUTPUT_FILE_NAME_ODV ), "name of generic output file" )
1326  (m_option_dataOutputAllowAll.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_DATA_OUTPUT_ALLOW_ALL_ODV ), "allow all subEnvs write to a generic output file" )
1327  (m_option_dataOutputAllowedSet.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_DATA_OUTPUT_ALLOWED_SET_ODV ), "subEnvs that will write to generic output file" )
1328  (m_option_totallyMute.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_TOTALLY_MUTE_ODV ), "totally mute (no printout msg)" )
1329  (m_option_initialPosition_dataInputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_NAME_ODV ), "name of input file for raw chain " )
1330  (m_option_initialPosition_dataInputFileType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_INITIAL_POSITION_DATA_INPUT_FILE_TYPE_ODV ), "type of input file for raw chain " )
1331  (m_option_initialProposalCovMatrix_dataInputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_NAME_ODV), "name of input file for raw chain " )
1332  (m_option_initialProposalCovMatrix_dataInputFileType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_INITIAL_PROPOSAL_COV_MATRIX_DATA_INPUT_FILE_TYPE_ODV), "type of input file for raw chain " )
1333  (m_option_listOfDisabledParameters.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_LIST_OF_DISABLED_PARAMETERS_ODV ), "list of disabled parameters" )
1334  (m_option_rawChain_dataInputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_NAME_ODV ), "name of input file for raw chain " )
1335  (m_option_rawChain_dataInputFileType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_RAW_CHAIN_DATA_INPUT_FILE_TYPE_ODV ), "type of input file for raw chain " )
1336  (m_option_rawChain_size.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_RAW_CHAIN_SIZE_ODV ), "size of raw chain" )
1337  (m_option_rawChain_generateExtra.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_RAW_CHAIN_GENERATE_EXTRA_ODV ), "generate extra information about raw chain" )
1338  (m_option_rawChain_displayPeriod.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_RAW_CHAIN_DISPLAY_PERIOD_ODV ), "period of msg display during raw chain generation" )
1339  (m_option_rawChain_measureRunTimes.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_RAW_CHAIN_MEASURE_RUN_TIMES_ODV ), "measure run times" )
1340  (m_option_rawChain_dataOutputPeriod.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_PERIOD_ODV ), "period of msg display during raw chain generation" )
1341  (m_option_rawChain_dataOutputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_NAME_ODV ), "name of output file for raw chain " )
1342  (m_option_rawChain_dataOutputFileType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV ), "type of output file for raw chain " )
1343  (m_option_rawChain_dataOutputAllowAll.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV ), "allow all subEnvs to write raw chain to an output file" )
1344  (m_option_rawChain_dataOutputAllowedSet.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_RAW_CHAIN_DATA_OUTPUT_ALLOWED_SET_ODV ), "subEnvs that will write raw chain to output file" )
1345 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1346  (m_option_rawChain_computeStats.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_RAW_CHAIN_COMPUTE_STATS_ODV ), "compute statistics on raw chain" )
1347 #endif
1348  (m_option_filteredChain_generate.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_FILTERED_CHAIN_GENERATE_ODV ), "generate filtered chain" )
1349  (m_option_filteredChain_discardedPortion.c_str(), boost::program_options::value<double >()->default_value(UQ_MH_SG_FILTERED_CHAIN_DISCARDED_PORTION_ODV ), "initial discarded portion for chain filtering" )
1350  (m_option_filteredChain_lag.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_FILTERED_CHAIN_LAG_ODV ), "spacing for chain filtering" )
1351  (m_option_filteredChain_dataOutputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_NAME_ODV ), "name of output file for filtered chain" )
1352  (m_option_filteredChain_dataOutputFileType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_FILE_TYPE_ODV ), "type of output file for filtered chain" )
1353  (m_option_filteredChain_dataOutputAllowAll.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_ALLOW_ALL_ODV ), "allow all subEnvs to write filt chain to an output file" )
1354  (m_option_filteredChain_dataOutputAllowedSet.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_FILTERED_CHAIN_DATA_OUTPUT_ALLOWED_SET_ODV ), "subEnvs that will write filt chain to output file" )
1355 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1356  (m_option_filteredChain_computeStats.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_FILTERED_CHAIN_COMPUTE_STATS_ODV ), "compute statistics on filtered chain" )
1357 #endif
1358  (m_option_displayCandidates.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_DISPLAY_CANDIDATES_ODV ), "display candidates in the core MH algorithm" )
1359  (m_option_putOutOfBoundsInChain.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_PUT_OUT_OF_BOUNDS_IN_CHAIN_ODV ), "put 'out of bound' candidates in chain as well" )
1360  (m_option_tk_useLocalHessian.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_TK_USE_LOCAL_HESSIAN_ODV ), "'proposal' use local Hessian" )
1361  (m_option_tk_useNewtonComponent.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_TK_USE_NEWTON_COMPONENT_ODV ), "'proposal' use Newton component" )
1362  (m_option_dr_maxNumExtraStages.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_DR_MAX_NUM_EXTRA_STAGES_ODV ), "'dr' maximum number of extra stages" )
1363  (m_option_dr_listOfScalesForExtraStages.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_DR_LIST_OF_SCALES_FOR_EXTRA_STAGES_ODV ), "'dr' scales for prop cov matrices from 2nd stage on" )
1364  (m_option_dr_duringAmNonAdaptiveInt.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_DR_DURING_AM_NON_ADAPTIVE_INT_ODV ), "'dr' used during 'am' non adaptive interval" )
1365  (m_option_am_keepInitialMatrix.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_AM_KEEP_INITIAL_MATRIX_ODV ), "'am' keep initial (given) matrix" )
1366  (m_option_am_initialNonAdaptInterval.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_AM_INIT_NON_ADAPT_INT_ODV ), "'am' initial non adaptation interval" )
1367  (m_option_am_adaptInterval.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_AM_ADAPT_INTERVAL_ODV ), "'am' adaptation interval" )
1368  (m_option_am_adaptedMatrices_dataOutputPeriod.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_PERIOD_ODV ), "period for outputting 'am' adapted matrices" )
1369  (m_option_am_adaptedMatrices_dataOutputFileName.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_NAME_ODV ), "name of output file for 'am' adapted matrices" )
1370  (m_option_am_adaptedMatrices_dataOutputFileType.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_FILE_TYPE_ODV ), "type of output file for 'am' adapted matrices" )
1371  (m_option_am_adaptedMatrices_dataOutputAllowAll.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOW_ALL_ODV ), "type of output file for 'am' adapted matrices" )
1372  (m_option_am_adaptedMatrices_dataOutputAllowedSet.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_AM_ADAPTED_MATRICES_DATA_OUTPUT_ALLOWED_SET_ODV ), "type of output file for 'am' adapted matrices" )
1373  (m_option_am_eta.c_str(), boost::program_options::value<double >()->default_value(UQ_MH_SG_AM_ETA_ODV ), "'am' eta" )
1374  (m_option_am_epsilon.c_str(), boost::program_options::value<double >()->default_value(UQ_MH_SG_AM_EPSILON_ODV ), "'am' epsilon" )
1375  (m_option_enableBrooksGelmanConvMonitor.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_ENABLE_BROOKS_GELMAN_CONV_MONITOR ), "assess convergence using Brooks-Gelman metric" )
1376  (m_option_BrooksGelmanLag.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_BROOKS_GELMAN_LAG ), "number of chain positions before starting to compute metric")
1377  (m_option_outputLogLikelihood.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_OUTPUT_LOG_LIKELIHOOD ), "flag to toggle output of log likelihood values" )
1378  (m_option_outputLogTarget.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_OUTPUT_LOG_TARGET ), "flag to toggle output of log target values" )
1379  (m_option_doLogitTransform.c_str(), boost::program_options::value<bool >()->default_value(UQ_MH_SG_DO_LOGIT_TRANSFORM ), "flag to toggle logit transform for bounded domains" )
1380  (m_option_algorithm.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_ALGORITHM ), "which mcmc algorithm to use" )
1381  (m_option_tk.c_str(), boost::program_options::value<std::string >()->default_value(UQ_MH_SG_TK ), "which mcmc tk to use" )
1382  (m_option_updateInterval.c_str(), boost::program_options::value<unsigned int>()->default_value(UQ_MH_SG_UPDATE_INTERVAL ), "how often to call updateTK method" )
1383  ;
1384 
1385  return;
1386 }
std::string m_option_am_epsilon
See MhOptionsValues::m_amEpsilon.
std::string m_option_am_eta
See MhOptionsValues::m_amEta.
void QUESO::MetropolisHastingsSGOptions::getMyOptionValues ( boost::program_options::options_description &  optionsDesc)
private

Gets the sequence options defined to the Metropolis-Hastings algorithm.

Definition at line 1392 of file MetropolisHastingsSGOptions.C.

References QUESO::BaseEnvironment::allOptionsMap(), QUESO::BaseEnvironment::fullRank(), QUESO::BaseEnvironment::inter0Rank(), QUESO::MhOptionsValues::m_algorithm, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputAllowAll, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputAllowedSet, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputFileName, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputFileType, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputPeriod, QUESO::MhOptionsValues::m_amAdaptInterval, QUESO::MhOptionsValues::m_amEpsilon, QUESO::MhOptionsValues::m_amEta, QUESO::MhOptionsValues::m_amInitialNonAdaptInterval, QUESO::MhOptionsValues::m_amKeepInitialMatrix, QUESO::MhOptionsValues::m_BrooksGelmanLag, QUESO::MhOptionsValues::m_dataOutputAllowAll, QUESO::MhOptionsValues::m_dataOutputAllowedSet, QUESO::MhOptionsValues::m_dataOutputFileName, QUESO::MhOptionsValues::m_displayCandidates, QUESO::MhOptionsValues::m_doLogitTransform, QUESO::MhOptionsValues::m_drDuringAmNonAdaptiveInt, QUESO::MhOptionsValues::m_drMaxNumExtraStages, QUESO::MhOptionsValues::m_drScalesForExtraStages, QUESO::MhOptionsValues::m_enableBrooksGelmanConvMonitor, m_env, QUESO::MhOptionsValues::m_filteredChainComputeStats, QUESO::MhOptionsValues::m_filteredChainDataOutputAllowAll, QUESO::MhOptionsValues::m_filteredChainDataOutputAllowedSet, QUESO::MhOptionsValues::m_filteredChainDataOutputFileName, QUESO::MhOptionsValues::m_filteredChainDataOutputFileType, QUESO::MhOptionsValues::m_filteredChainDiscardedPortion, QUESO::MhOptionsValues::m_filteredChainGenerate, QUESO::MhOptionsValues::m_filteredChainLag, QUESO::MhOptionsValues::m_initialPositionDataInputFileName, QUESO::MhOptionsValues::m_initialPositionDataInputFileType, QUESO::MhOptionsValues::m_initialProposalCovMatrixDataInputFileName, QUESO::MhOptionsValues::m_initialProposalCovMatrixDataInputFileType, m_option_algorithm, m_option_am_adaptedMatrices_dataOutputAllowAll, m_option_am_adaptedMatrices_dataOutputAllowedSet, m_option_am_adaptedMatrices_dataOutputFileName, m_option_am_adaptedMatrices_dataOutputFileType, m_option_am_adaptedMatrices_dataOutputPeriod, m_option_am_adaptInterval, m_option_am_epsilon, m_option_am_eta, m_option_am_initialNonAdaptInterval, m_option_am_keepInitialMatrix, m_option_BrooksGelmanLag, m_option_dataOutputAllowAll, m_option_dataOutputAllowedSet, m_option_dataOutputFileName, m_option_displayCandidates, m_option_doLogitTransform, m_option_dr_duringAmNonAdaptiveInt, m_option_dr_listOfScalesForExtraStages, m_option_dr_maxNumExtraStages, m_option_enableBrooksGelmanConvMonitor, m_option_filteredChain_computeStats, m_option_filteredChain_dataOutputAllowAll, m_option_filteredChain_dataOutputAllowedSet, m_option_filteredChain_dataOutputFileName, m_option_filteredChain_dataOutputFileType, m_option_filteredChain_discardedPortion, m_option_filteredChain_generate, m_option_filteredChain_lag, m_option_initialPosition_dataInputFileName, m_option_initialPosition_dataInputFileType, m_option_initialProposalCovMatrix_dataInputFileName, m_option_initialProposalCovMatrix_dataInputFileType, m_option_listOfDisabledParameters, m_option_outputLogLikelihood, m_option_outputLogTarget, m_option_putOutOfBoundsInChain, m_option_rawChain_computeStats, m_option_rawChain_dataInputFileName, m_option_rawChain_dataInputFileType, m_option_rawChain_dataOutputAllowAll, m_option_rawChain_dataOutputAllowedSet, m_option_rawChain_dataOutputFileName, m_option_rawChain_dataOutputFileType, m_option_rawChain_dataOutputPeriod, m_option_rawChain_displayPeriod, m_option_rawChain_generateExtra, m_option_rawChain_measureRunTimes, m_option_rawChain_size, m_option_tk, m_option_tk_useLocalHessian, m_option_tk_useNewtonComponent, m_option_totallyMute, m_option_updateInterval, QUESO::MhOptionsValues::m_outputLogLikelihood, QUESO::MhOptionsValues::m_outputLogTarget, m_ov, QUESO::MhOptionsValues::m_parameterDisabledSet, QUESO::MhOptionsValues::m_putOutOfBoundsInChain, QUESO::MhOptionsValues::m_rawChainComputeStats, QUESO::MhOptionsValues::m_rawChainDataInputFileName, QUESO::MhOptionsValues::m_rawChainDataInputFileType, QUESO::MhOptionsValues::m_rawChainDataOutputAllowAll, QUESO::MhOptionsValues::m_rawChainDataOutputAllowedSet, QUESO::MhOptionsValues::m_rawChainDataOutputFileName, QUESO::MhOptionsValues::m_rawChainDataOutputFileType, QUESO::MhOptionsValues::m_rawChainDataOutputPeriod, QUESO::MhOptionsValues::m_rawChainDisplayPeriod, QUESO::MhOptionsValues::m_rawChainGenerateExtra, QUESO::MhOptionsValues::m_rawChainMeasureRunTimes, QUESO::MhOptionsValues::m_rawChainSize, QUESO::MhOptionsValues::m_tk, QUESO::MhOptionsValues::m_tkUseLocalHessian, QUESO::MhOptionsValues::m_tkUseNewtonComponent, QUESO::MhOptionsValues::m_totallyMute, QUESO::MhOptionsValues::m_updateInterval, QUESO::MiscReadDoublesFromString(), scale, QUESO::BaseEnvironment::subDisplayFile(), QUESO::BaseEnvironment::subId(), QUESO::BaseEnvironment::subRank(), and QUESO::BaseEnvironment::worldRank().

Referenced by scanOptionsValues().

1393 {
1394  queso_deprecated();
1395 
1396  if (m_env.allOptionsMap().count(m_option_help)) {
1397  if ((m_env.subDisplayFile()) &&
1398  (m_ov.m_totallyMute == false)) {
1399  *m_env.subDisplayFile() << optionsDesc
1400  << std::endl;
1401  }
1402  }
1403 
1405  m_ov.m_dataOutputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_dataOutputFileName]).as<std::string>();
1406  }
1407 
1408  if (m_env.allOptionsMap().count(m_option_dataOutputAllowAll.c_str())) {
1410  }
1411 
1412  if (m_ov.m_dataOutputAllowAll) {
1414  }
1416  m_ov.m_dataOutputAllowedSet.clear();
1417  std::vector<double> tmpAllow(0,0.);
1418  std::string inputString = m_env.allOptionsMap()[m_option_dataOutputAllowedSet].as<std::string>();
1419  MiscReadDoublesFromString(inputString,tmpAllow);
1420 
1421  if (tmpAllow.size() > 0) {
1422  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
1423  m_ov.m_dataOutputAllowedSet.insert((unsigned int) tmpAllow[i]);
1424  }
1425  }
1426  }
1427 
1428  if (m_env.allOptionsMap().count(m_option_totallyMute)) {
1429  m_ov.m_totallyMute = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_totallyMute]).as<bool>();
1430  }
1431 
1433  m_ov.m_initialPositionDataInputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_initialPosition_dataInputFileName]).as<std::string>();
1434  }
1435 
1437  m_ov.m_initialPositionDataInputFileType = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_initialPosition_dataInputFileType]).as<std::string>();
1438  }
1439 
1441  m_ov.m_initialProposalCovMatrixDataInputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_initialProposalCovMatrix_dataInputFileName]).as<std::string>();
1442  }
1443 
1445  m_ov.m_initialProposalCovMatrixDataInputFileType = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_initialProposalCovMatrix_dataInputFileType]).as<std::string>();
1446  }
1447 
1449  m_ov.m_parameterDisabledSet.clear();
1450  std::vector<double> tmpAllow(0,0.);
1451  std::string inputString = m_env.allOptionsMap()[m_option_listOfDisabledParameters].as<std::string>();
1452  MiscReadDoublesFromString(inputString,tmpAllow);
1453  if (tmpAllow.size() > 0) {
1454  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
1455  m_ov.m_parameterDisabledSet.insert((unsigned int) tmpAllow[i]);
1456  }
1457  }
1458  }
1459 
1461  m_ov.m_rawChainDataInputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_dataInputFileName]).as<std::string>();
1462  }
1463 
1465  m_ov.m_rawChainDataInputFileType = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_dataInputFileType]).as<std::string>();
1466  }
1467 
1469  m_ov.m_rawChainSize = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_size]).as<unsigned int>();
1470  }
1471 
1473  m_ov.m_rawChainDisplayPeriod = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_displayPeriod]).as<unsigned int>();
1474  }
1475 
1477  m_ov.m_rawChainMeasureRunTimes = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_measureRunTimes]).as<bool>();
1478  }
1479 
1481  m_ov.m_rawChainDataOutputPeriod = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_dataOutputPeriod]).as<unsigned int>();
1482  }
1483 
1485  m_ov.m_rawChainDataOutputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_dataOutputFileName]).as<std::string>();
1486  }
1487 
1489  m_ov.m_rawChainDataOutputFileType = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_dataOutputFileType]).as<std::string>();
1490  }
1491 
1494  }
1495 
1498  }
1501  std::vector<double> tmpAllow(0,0.);
1502  std::string inputString = m_env.allOptionsMap()[m_option_rawChain_dataOutputAllowedSet].as<std::string>();
1503  MiscReadDoublesFromString(inputString,tmpAllow);
1504 
1505  if (tmpAllow.size() > 0) {
1506  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
1507  m_ov.m_rawChainDataOutputAllowedSet.insert((unsigned int) tmpAllow[i]);
1508  }
1509  }
1510  }
1511 
1512 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1514  m_ov.m_rawChainComputeStats = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_computeStats]).as<bool>();
1515  }
1516 #endif
1518  m_ov.m_rawChainGenerateExtra = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_rawChain_generateExtra]).as<bool>();
1519  }
1520 
1522  m_ov.m_filteredChainGenerate = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_filteredChain_generate]).as<bool>();
1523  }
1524 
1526  m_ov.m_filteredChainDiscardedPortion = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_filteredChain_discardedPortion]).as<double>();
1527  }
1528 
1530  m_ov.m_filteredChainLag = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_filteredChain_lag]).as<unsigned int>();
1531  }
1532  if ((m_ov.m_filteredChainGenerate == true) &&
1533  (m_ov.m_filteredChainLag < 2 )) {
1534  std::cerr << "WARNING In MetropolisHastingsSG<P_V,P_M>::getMyOptionsValues()"
1535  << ", worldRank " << m_env.worldRank()
1536  << ", fullRank " << m_env.fullRank()
1537  << ", subEnvironment " << m_env.subId()
1538  << ", subRank " << m_env.subRank()
1539  << ", inter0Rank " << m_env.inter0Rank()
1540  << ": forcing the value of '" << m_option_filteredChain_lag
1541  << "' from " << m_ov.m_filteredChainLag
1542  << " to " << 2
1543  << std::endl;
1545  }
1546 
1548  m_ov.m_filteredChainDataOutputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_filteredChain_dataOutputFileName]).as<std::string>();
1549  }
1550 
1552  m_ov.m_filteredChainDataOutputFileType = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_filteredChain_dataOutputFileType]).as<std::string>();
1553  }
1554 
1557  }
1558 
1561  }
1564  std::vector<double> tmpAllow(0,0.);
1565  std::string inputString = m_env.allOptionsMap()[m_option_filteredChain_dataOutputAllowedSet].as<std::string>();
1566  MiscReadDoublesFromString(inputString,tmpAllow);
1567 
1568  if (tmpAllow.size() > 0) {
1569  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
1570  m_ov.m_filteredChainDataOutputAllowedSet.insert((unsigned int) tmpAllow[i]);
1571  }
1572  }
1573  }
1574 
1575 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1577  m_ov.m_filteredChainComputeStats = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_filteredChain_computeStats]).as<bool>();
1578  }
1579 #endif
1581  m_ov.m_displayCandidates = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_displayCandidates]).as<bool>();
1582  }
1583 
1585  m_ov.m_putOutOfBoundsInChain = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_putOutOfBoundsInChain]).as<bool>();
1586  }
1587 
1589  m_ov.m_tkUseLocalHessian = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_tk_useLocalHessian]).as<bool>();
1590  }
1591 
1593  m_ov.m_tkUseNewtonComponent = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_tk_useNewtonComponent]).as<bool>();
1594  }
1595 
1597  m_ov.m_drMaxNumExtraStages = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_dr_maxNumExtraStages]).as<unsigned int>();
1598  }
1599 
1600  std::vector<double> tmpScales(0,0.);
1602  std::string inputString = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_dr_listOfScalesForExtraStages]).as<std::string>();
1603  MiscReadDoublesFromString(inputString,tmpScales);
1604  //if (m_env.subDisplayFile()) {
1605  // *m_env.subDisplayFile() << "In MetropolisHastingsSG<P_V,P_M>::getMyOptionValues(): scales =";
1606  // for (unsigned int i = 0; i < tmpScales.size(); ++i) {
1607  // *m_env.subDisplayFile() << " " << tmpScales[i];
1608  // }
1609  // *m_env.subDisplayFile() << std::endl;
1610  //}
1611  }
1612 
1613  if (m_ov.m_drMaxNumExtraStages > 0) {
1614  double scale = 1.0;
1615  unsigned int tmpSize = tmpScales.size();
1616 
1619  for (unsigned int i = 0; i < m_ov.m_drMaxNumExtraStages; ++i) {
1620  if (i < tmpSize) scale = tmpScales[i];
1622  }
1623  //updateTK();
1624  }
1625 
1627  m_ov.m_drDuringAmNonAdaptiveInt = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_dr_duringAmNonAdaptiveInt]).as<bool>();
1628  }
1629 
1631  m_ov.m_amKeepInitialMatrix = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_am_keepInitialMatrix]).as<bool>();
1632  }
1633 
1635  m_ov.m_amInitialNonAdaptInterval = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_am_initialNonAdaptInterval]).as<unsigned int>();
1636  }
1637 
1639  m_ov.m_amAdaptInterval = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_am_adaptInterval]).as<unsigned int>();
1640  }
1641 
1643  m_ov.m_amAdaptedMatricesDataOutputPeriod = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_am_adaptedMatrices_dataOutputPeriod]).as<unsigned int>();
1644  }
1645 
1647  m_ov.m_amAdaptedMatricesDataOutputFileName = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_am_adaptedMatrices_dataOutputFileName]).as<std::string>();
1648  }
1649 
1651  m_ov.m_amAdaptedMatricesDataOutputFileType = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_am_adaptedMatrices_dataOutputFileType]).as<std::string>();
1652  }
1653 
1656  }
1657 
1660  }
1663  std::vector<double> tmpAllow(0,0.);
1664  std::string inputString = m_env.allOptionsMap()[m_option_am_adaptedMatrices_dataOutputAllowedSet].as<std::string>();
1665  MiscReadDoublesFromString(inputString,tmpAllow);
1666 
1667  if (tmpAllow.size() > 0) {
1668  for (unsigned int i = 0; i < tmpAllow.size(); ++i) {
1669  m_ov.m_amAdaptedMatricesDataOutputAllowedSet.insert((unsigned int) tmpAllow[i]);
1670  }
1671  }
1672  }
1673 
1674  if (m_env.allOptionsMap().count(m_option_am_eta)) {
1675  m_ov.m_amEta = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_am_eta]).as<double>();
1676  }
1677 
1678  if (m_env.allOptionsMap().count(m_option_am_epsilon)) {
1679  m_ov.m_amEpsilon = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_am_epsilon]).as<double>();
1680  }
1681 
1683  m_ov.m_enableBrooksGelmanConvMonitor = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_enableBrooksGelmanConvMonitor]).as<unsigned int>();
1684  }
1685 
1687  m_ov.m_BrooksGelmanLag = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_BrooksGelmanLag]).as<unsigned int>();
1688  }
1689 
1691  m_ov.m_outputLogLikelihood = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_outputLogLikelihood]).as<bool>();
1692  }
1693 
1695  m_ov.m_outputLogTarget = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_outputLogTarget]).as<bool>();
1696  }
1697 
1699  m_ov.m_doLogitTransform = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_doLogitTransform]).as<bool>();
1700  }
1701 
1702  if (m_env.allOptionsMap().count(m_option_algorithm)) {
1703  m_ov.m_algorithm = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_algorithm]).as<std::string>();
1704  }
1705 
1706  if (m_env.allOptionsMap().count(m_option_tk)) {
1707  m_ov.m_tk = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_tk]).as<std::string>();
1708  }
1709 
1711  m_ov.m_updateInterval = ((const boost::program_options::variable_value&) m_env.allOptionsMap()[m_option_updateInterval]).as<unsigned int>();
1712  }
1713 }
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
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.
unsigned int m_amAdaptedMatricesDataOutputPeriod
The frequency (after m_amInitialNonAdaptInterval samples are done) of printing the last adapted propo...
bool m_doLogitTransform
Flag for deciding whether or not to do logit transform of bounded domains Default is true...
std::vector< double > m_drScalesForExtraStages
The vector of scale factors for the proposal covariance matrix to use for delayed rejection...
unsigned int m_amAdaptInterval
The frequency at which to adapt the proposal covariance matrix.
bool m_dataOutputAllowAll
If true, all processes write output and m_dataOutputAllowedSet is ignored.
std::string m_option_am_epsilon
See MhOptionsValues::m_amEpsilon.
double m_filteredChainDiscardedPortion
What initial fraction of the filtered chain is discarded.
bool m_drDuringAmNonAdaptiveInt
Do delayed rejection during the initial non-adaptive part of sampling?
bool m_rawChainGenerateExtra
If true, extra chain information is computed/stored.
std::string m_amAdaptedMatricesDataOutputFileType
The filetype of m_amAdaptedMatricesDataOutputFileName. Only &quot;m&quot; (matlab) is currently supported...
std::set< unsigned int > m_amAdaptedMatricesDataOutputAllowedSet
This option is a no-op. The default is the empty set.
MhOptionsValues m_ov
This class is where the actual options are stored.
unsigned int m_filteredChainLag
Set the lag for the filtered chain. Default is 1.
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_dataOutputAllowedSet
The set of MPI ranks that can write output. See m_dataOutputAllowAll.
std::string m_option_am_eta
See MhOptionsValues::m_amEta.
bool m_amAdaptedMatricesDataOutputAllowAll
This option is a no-op. The default is false.
std::string m_algorithm
Which algorithm to use for the MCMC. Default is &quot;random_walk&quot;.
int fullRank() const
Returns the rank of the MPI process in QUESO&#39;s full communicator.
Definition: Environment.C:268
double m_amEpsilon
Regularisation parameter for the DRAM covariance matrix.
bool m_outputLogLikelihood
Flag for deciding whether or not to dump log likelihood values in output. Default is true...
unsigned int m_drMaxNumExtraStages
The number of delayed rejection stages to do. Default is 0.
bool m_rawChainComputeStats
Flag to tell QUESO whether or not to compute chain statistics. Default is false.
std::string m_rawChainDataInputFileType
The filetype of m_rawChainDataInputFileName. Only &quot;m&quot; (matlab) is currently supported. Default is &quot;m&quot;.
int inter0Rank() const
Returns the process inter0 rank.
Definition: Environment.C:307
std::set< unsigned int > m_rawChainDataOutputAllowedSet
The set of MPI ranks that will write Markov chain output to a file. See also m_rawChainDataOutputAllo...
std::string m_rawChainDataOutputFileName
If not &quot;.&quot;, filename to write the Markov chain to.
int worldRank() const
Returns the same thing as fullRank()
Definition: Environment.C:262
unsigned int m_rawChainDataOutputPeriod
The frequency with which to write chain output. Defaults to 0.
bool m_amKeepInitialMatrix
This option is a no-op. The default is false.
std::string m_tk
Which transition kernel to use for MCMC. Default is &quot;random_walk&quot;.
bool m_displayCandidates
Toggle to tell QUESO whether or not to write proposal (candidate) state to output file...
unsigned int m_amInitialNonAdaptInterval
The number of initial samples to do without adapting the proposal covariance matrix.
std::string m_initialPositionDataInputFileName
If not &quot;.&quot;, reads the contents of the file and uses that to start the MCMC. Default is &quot;...
void MiscReadDoublesFromString(const std::string &inputString, std::vector< double > &outputDoubles)
Definition: Miscellaneous.C:40
bool m_rawChainDataOutputAllowAll
Toggle for whether or not to allow all processes to write Markov chain output to a file...
std::string m_rawChainDataOutputFileType
The filetype of m_rawChainDataOutputFileName.
unsigned int m_rawChainSize
The size of the chain (number of posterior samples) to generate. Default is 100.
std::string m_initialProposalCovMatrixDataInputFileName
If not &quot;.&quot;, reads the contents of the file as the initial proposal covariance matrix.
unsigned int m_updateInterval
How often to call the TK&#39;s updateTK method. Default is 1.
unsigned int m_enableBrooksGelmanConvMonitor
The frequency with which to compute the Brooks-Gelman convergence statistic.
boost::program_options::variables_map & allOptionsMap() const
Definition: Environment.C:386
bool m_outputLogTarget
Flag for deciding whether or not to dump log target values in output Default is true.
int subRank() const
Returns the rank of the MPI process in the sub-communicator subComm()
Definition: Environment.C:287
unsigned int m_rawChainDisplayPeriod
The frequency with which to output diagnostic information.
bool m_tkUseLocalHessian
Flag to tell QUESO whether or not to use Hessian information for the proposal covariance matrix...
bool m_filteredChainComputeStats
Toggle to tell QUESO whether or not to compute statistics on the filtered chain. Default is false...
std::string m_dataOutputFileName
The base name of output files where the chain (and related information) will be written.
std::string m_filteredChainDataOutputFileType
The filetype of m_filteredChainDataOutputFileName. Only &quot;m&quot; (matlab) is currently supported...
bool m_rawChainMeasureRunTimes
If true, measures timings spent in various chain computions and writes them to the output file...
double scale
Definition: ann2fig.cpp:85
bool m_filteredChainGenerate
Toggle the option to save a filtered chain.
bool m_filteredChainDataOutputAllowAll
Toggle for whether or not to allow all processes to write filtered Markov chain output to a file...
bool m_putOutOfBoundsInChain
Flag to tell QUESO how chains should be upon generating a proposal that is out of the problem domain...
double m_amEta
Proposal covariance scaling factor, usually 2.4 * 2.4 / d.
std::set< unsigned int > m_parameterDisabledSet
Set of parameters that don&#39;t get sampled.
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:320
std::string m_amAdaptedMatricesDataOutputFileName
If not &quot;.&quot;, this is the file to write adapted proposal covariance matrices to. Default is &quot;...
bool m_totallyMute
If true, zero output is written to files. Default is false.
std::string m_initialProposalCovMatrixDataInputFileType
The filetype of m_initialProposalCovMatrixDataInputFileName. Only &quot;m&quot; (matlab) is currently supported...
unsigned int subId() const
Access function to the number of each sub-environment Id: m_subId.
Definition: Environment.C:342
bool m_tkUseNewtonComponent
This option is a no-op. Default is true.
unsigned int m_BrooksGelmanLag
The lag with which to compute the Brooks-Gelman convergence statistic.
void QUESO::MetropolisHastingsSGOptions::print ( std::ostream &  os) const

It prints the option values.

Definition at line 1229 of file MetropolisHastingsSGOptions.C.

References QUESO::MhOptionsValues::m_algorithm, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputAllowAll, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputAllowedSet, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputFileName, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputFileType, QUESO::MhOptionsValues::m_amAdaptedMatricesDataOutputPeriod, QUESO::MhOptionsValues::m_amAdaptInterval, QUESO::MhOptionsValues::m_amEpsilon, QUESO::MhOptionsValues::m_amEta, QUESO::MhOptionsValues::m_amInitialNonAdaptInterval, QUESO::MhOptionsValues::m_amKeepInitialMatrix, QUESO::MhOptionsValues::m_BrooksGelmanLag, QUESO::MhOptionsValues::m_dataOutputAllowAll, QUESO::MhOptionsValues::m_dataOutputAllowedSet, QUESO::MhOptionsValues::m_dataOutputFileName, QUESO::MhOptionsValues::m_displayCandidates, QUESO::MhOptionsValues::m_doLogitTransform, QUESO::MhOptionsValues::m_drDuringAmNonAdaptiveInt, QUESO::MhOptionsValues::m_drMaxNumExtraStages, QUESO::MhOptionsValues::m_drScalesForExtraStages, QUESO::MhOptionsValues::m_enableBrooksGelmanConvMonitor, QUESO::MhOptionsValues::m_filteredChainComputeStats, QUESO::MhOptionsValues::m_filteredChainDataOutputAllowAll, QUESO::MhOptionsValues::m_filteredChainDataOutputAllowedSet, QUESO::MhOptionsValues::m_filteredChainDataOutputFileName, QUESO::MhOptionsValues::m_filteredChainDataOutputFileType, QUESO::MhOptionsValues::m_filteredChainDiscardedPortion, QUESO::MhOptionsValues::m_filteredChainGenerate, QUESO::MhOptionsValues::m_filteredChainLag, QUESO::MhOptionsValues::m_initialPositionDataInputFileName, QUESO::MhOptionsValues::m_initialPositionDataInputFileType, QUESO::MhOptionsValues::m_initialProposalCovMatrixDataInputFileName, QUESO::MhOptionsValues::m_initialProposalCovMatrixDataInputFileType, QUESO::MhOptionsValues::m_outputLogLikelihood, QUESO::MhOptionsValues::m_outputLogTarget, m_ov, QUESO::MhOptionsValues::m_parameterDisabledSet, QUESO::MhOptionsValues::m_putOutOfBoundsInChain, QUESO::MhOptionsValues::m_rawChainComputeStats, QUESO::MhOptionsValues::m_rawChainDataInputFileName, QUESO::MhOptionsValues::m_rawChainDataInputFileType, QUESO::MhOptionsValues::m_rawChainDataOutputAllowAll, QUESO::MhOptionsValues::m_rawChainDataOutputAllowedSet, QUESO::MhOptionsValues::m_rawChainDataOutputFileName, QUESO::MhOptionsValues::m_rawChainDataOutputFileType, QUESO::MhOptionsValues::m_rawChainDataOutputPeriod, QUESO::MhOptionsValues::m_rawChainDisplayPeriod, QUESO::MhOptionsValues::m_rawChainGenerateExtra, QUESO::MhOptionsValues::m_rawChainMeasureRunTimes, QUESO::MhOptionsValues::m_rawChainSize, QUESO::MhOptionsValues::m_tk, QUESO::MhOptionsValues::m_tkUseLocalHessian, QUESO::MhOptionsValues::m_tkUseNewtonComponent, QUESO::MhOptionsValues::m_totallyMute, and QUESO::MhOptionsValues::m_updateInterval.

Referenced by QUESO::operator<<().

1230 {
1231  queso_deprecated();
1232 
1235  << "\n" << m_option_dataOutputAllowedSet << " = ";
1236  for (std::set<unsigned int>::iterator setIt = m_ov.m_dataOutputAllowedSet.begin(); setIt != m_ov.m_dataOutputAllowedSet.end(); ++setIt) {
1237  os << *setIt << " ";
1238  }
1239  os << "\n" << m_option_totallyMute << " = " << m_ov.m_totallyMute
1244  << "\n" << m_option_listOfDisabledParameters << " = ";
1245  for (std::set<unsigned int>::iterator setIt = m_ov.m_parameterDisabledSet.begin(); setIt != m_ov.m_parameterDisabledSet.end(); ++setIt) {
1246  os << *setIt << " ";
1247  }
1250  << "\n" << m_option_rawChain_size << " = " << m_ov.m_rawChainSize
1258  << "\n" << m_option_rawChain_dataOutputAllowedSet << " = ";
1259  for (std::set<unsigned int>::iterator setIt = m_ov.m_rawChainDataOutputAllowedSet.begin(); setIt != m_ov.m_rawChainDataOutputAllowedSet.end(); ++setIt) {
1260  os << *setIt << " ";
1261  }
1262  os
1263 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1265 #endif
1268  << "\n" << m_option_filteredChain_lag << " = " << m_ov.m_filteredChainLag
1272  << "\n" << m_option_filteredChain_dataOutputAllowedSet << " = ";
1273  for (std::set<unsigned int>::iterator setIt = m_ov.m_filteredChainDataOutputAllowedSet.begin(); setIt != m_ov.m_filteredChainDataOutputAllowedSet.end(); ++setIt) {
1274  os << *setIt << " ";
1275  }
1276  os
1277 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1279 #endif
1280  << "\n" << m_option_displayCandidates << " = " << m_ov.m_displayCandidates
1285  << "\n" << m_option_dr_listOfScalesForExtraStages << " = ";
1286  for (unsigned int i = 0; i < m_ov.m_drScalesForExtraStages.size(); ++i) {
1287  os << m_ov.m_drScalesForExtraStages[i] << " ";
1288  }
1292  << "\n" << m_option_am_adaptInterval << " = " << m_ov.m_amAdaptInterval
1298  for (std::set<unsigned int>::iterator setIt = m_ov.m_amAdaptedMatricesDataOutputAllowedSet.begin(); setIt != m_ov.m_amAdaptedMatricesDataOutputAllowedSet.end(); ++setIt) {
1299  os << *setIt << " ";
1300  }
1301  os << "\n" << m_option_am_eta << " = " << m_ov.m_amEta
1302  << "\n" << m_option_am_epsilon << " = " << m_ov.m_amEpsilon
1304  << "\n" << m_option_BrooksGelmanLag << " = " << m_ov.m_BrooksGelmanLag
1306  << "\n" << m_option_outputLogTarget << " = " << m_ov.m_outputLogTarget
1307  << "\n" << m_option_doLogitTransform << " = " << m_ov.m_doLogitTransform
1308  << "\n" << m_option_algorithm << " = " << m_ov.m_algorithm
1309  << "\n" << m_option_tk << " = " << m_ov.m_tk
1310  << "\n" << m_option_updateInterval << " = " << m_ov.m_updateInterval
1311  << std::endl;
1312 
1313  return;
1314 }
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
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.
unsigned int m_amAdaptedMatricesDataOutputPeriod
The frequency (after m_amInitialNonAdaptInterval samples are done) of printing the last adapted propo...
bool m_doLogitTransform
Flag for deciding whether or not to do logit transform of bounded domains Default is true...
std::vector< double > m_drScalesForExtraStages
The vector of scale factors for the proposal covariance matrix to use for delayed rejection...
unsigned int m_amAdaptInterval
The frequency at which to adapt the proposal covariance matrix.
bool m_dataOutputAllowAll
If true, all processes write output and m_dataOutputAllowedSet is ignored.
std::string m_option_am_epsilon
See MhOptionsValues::m_amEpsilon.
double m_filteredChainDiscardedPortion
What initial fraction of the filtered chain is discarded.
bool m_drDuringAmNonAdaptiveInt
Do delayed rejection during the initial non-adaptive part of sampling?
bool m_rawChainGenerateExtra
If true, extra chain information is computed/stored.
std::string m_amAdaptedMatricesDataOutputFileType
The filetype of m_amAdaptedMatricesDataOutputFileName. Only &quot;m&quot; (matlab) is currently supported...
std::set< unsigned int > m_amAdaptedMatricesDataOutputAllowedSet
This option is a no-op. The default is the empty set.
MhOptionsValues m_ov
This class is where the actual options are stored.
unsigned int m_filteredChainLag
Set the lag for the filtered chain. Default is 1.
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_dataOutputAllowedSet
The set of MPI ranks that can write output. See m_dataOutputAllowAll.
std::string m_option_am_eta
See MhOptionsValues::m_amEta.
bool m_amAdaptedMatricesDataOutputAllowAll
This option is a no-op. The default is false.
std::string m_algorithm
Which algorithm to use for the MCMC. Default is &quot;random_walk&quot;.
double m_amEpsilon
Regularisation parameter for the DRAM covariance matrix.
bool m_outputLogLikelihood
Flag for deciding whether or not to dump log likelihood values in output. Default is true...
unsigned int m_drMaxNumExtraStages
The number of delayed rejection stages to do. Default is 0.
bool m_rawChainComputeStats
Flag to tell QUESO whether or not to compute chain statistics. Default is false.
std::string m_rawChainDataInputFileType
The filetype of m_rawChainDataInputFileName. Only &quot;m&quot; (matlab) is currently supported. Default is &quot;m&quot;.
std::set< unsigned int > m_rawChainDataOutputAllowedSet
The set of MPI ranks that will write Markov chain output to a file. See also m_rawChainDataOutputAllo...
std::string m_rawChainDataOutputFileName
If not &quot;.&quot;, filename to write the Markov chain to.
unsigned int m_rawChainDataOutputPeriod
The frequency with which to write chain output. Defaults to 0.
bool m_amKeepInitialMatrix
This option is a no-op. The default is false.
std::string m_tk
Which transition kernel to use for MCMC. Default is &quot;random_walk&quot;.
bool m_displayCandidates
Toggle to tell QUESO whether or not to write proposal (candidate) state to output file...
unsigned int m_amInitialNonAdaptInterval
The number of initial samples to do without adapting the proposal covariance matrix.
std::string m_initialPositionDataInputFileName
If not &quot;.&quot;, reads the contents of the file and uses that to start the MCMC. Default is &quot;...
bool m_rawChainDataOutputAllowAll
Toggle for whether or not to allow all processes to write Markov chain output to a file...
std::string m_rawChainDataOutputFileType
The filetype of m_rawChainDataOutputFileName.
unsigned int m_rawChainSize
The size of the chain (number of posterior samples) to generate. Default is 100.
std::string m_initialProposalCovMatrixDataInputFileName
If not &quot;.&quot;, reads the contents of the file as the initial proposal covariance matrix.
unsigned int m_updateInterval
How often to call the TK&#39;s updateTK method. Default is 1.
unsigned int m_enableBrooksGelmanConvMonitor
The frequency with which to compute the Brooks-Gelman convergence statistic.
bool m_outputLogTarget
Flag for deciding whether or not to dump log target values in output Default is true.
unsigned int m_rawChainDisplayPeriod
The frequency with which to output diagnostic information.
bool m_tkUseLocalHessian
Flag to tell QUESO whether or not to use Hessian information for the proposal covariance matrix...
bool m_filteredChainComputeStats
Toggle to tell QUESO whether or not to compute statistics on the filtered chain. Default is false...
std::string m_dataOutputFileName
The base name of output files where the chain (and related information) will be written.
std::string m_filteredChainDataOutputFileType
The filetype of m_filteredChainDataOutputFileName. Only &quot;m&quot; (matlab) is currently supported...
bool m_rawChainMeasureRunTimes
If true, measures timings spent in various chain computions and writes them to the output file...
bool m_filteredChainGenerate
Toggle the option to save a filtered chain.
bool m_filteredChainDataOutputAllowAll
Toggle for whether or not to allow all processes to write filtered Markov chain output to a file...
bool m_putOutOfBoundsInChain
Flag to tell QUESO how chains should be upon generating a proposal that is out of the problem domain...
double m_amEta
Proposal covariance scaling factor, usually 2.4 * 2.4 / d.
std::set< unsigned int > m_parameterDisabledSet
Set of parameters that don&#39;t get sampled.
std::string m_amAdaptedMatricesDataOutputFileName
If not &quot;.&quot;, this is the file to write adapted proposal covariance matrices to. Default is &quot;...
bool m_totallyMute
If true, zero output is written to files. Default is false.
std::string m_initialProposalCovMatrixDataInputFileType
The filetype of m_initialProposalCovMatrixDataInputFileName. Only &quot;m&quot; (matlab) is currently supported...
bool m_tkUseNewtonComponent
This option is a no-op. Default is true.
unsigned int m_BrooksGelmanLag
The lag with which to compute the Brooks-Gelman convergence statistic.
void QUESO::MetropolisHastingsSGOptions::scanOptionsValues ( )

It scans the option values from the options input file.

Definition at line 1193 of file MetropolisHastingsSGOptions.C.

References defineMyOptions(), getMyOptionValues(), m_env, QUESO::MhOptionsValues::m_filteredChainComputeStats, m_filteredChainStatisticalOptionsObj, m_filteredChainStatOptsInstantiated, m_optionsDesc, m_ov, m_prefix, QUESO::MhOptionsValues::m_rawChainComputeStats, m_rawChainStatisticalOptionsObj, m_rawChainStatOptsInstantiated, QUESO::MhOptionsValues::m_totallyMute, QUESO::BaseEnvironment::scanInputFileForMyOptions(), and QUESO::BaseEnvironment::subDisplayFile().

1194 {
1195  queso_deprecated();
1196 
1197 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
1198  queso_require_msg(m_optionsDesc, "m_optionsDesc variable is NULL");
1199 
1203 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
1204 
1205  if ((m_env.subDisplayFile() != NULL) &&
1206  (m_ov.m_totallyMute == false )) {
1207  *m_env.subDisplayFile() << "In MetropolisHastingsSGOptions::scanOptionsValues()"
1208  << ": after reading values of options with prefix '" << m_prefix
1209  << "', state of object is:"
1210  << "\n" << *this
1211  << std::endl;
1212  }
1213 
1214 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
1218  }
1222  }
1223 #endif
1224 
1225  return;
1226 }
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:397
SequenceStatisticalOptions * m_filteredChainStatisticalOptionsObj
MhOptionsValues m_ov
This class is where the actual options are stored.
bool m_rawChainComputeStats
Flag to tell QUESO whether or not to compute chain statistics. Default is false.
A templated class that stores statistical options (optionally read from an input file) ...
void getMyOptionValues(boost::program_options::options_description &optionsDesc)
Gets the sequence options defined to the Metropolis-Hastings algorithm.
void defineMyOptions(boost::program_options::options_description &optionsDesc) const
Defines the options for the Metropolis-Hastings generator of samples as the default options...
ScopedPtr< boost::program_options::options_description >::Type m_optionsDesc
bool m_filteredChainComputeStats
Toggle to tell QUESO whether or not to compute statistics on the filtered chain. Default is false...
std::ofstream * subDisplayFile() const
Access function for m_subDisplayFile (displays file on stream).
Definition: Environment.C:320
SequenceStatisticalOptions * m_rawChainStatisticalOptionsObj
bool m_totallyMute
If true, zero output is written to files. Default is false.

Member Data Documentation

const BaseEnvironment& QUESO::MetropolisHastingsSGOptions::m_env
private
SequenceStatisticalOptions* QUESO::MetropolisHastingsSGOptions::m_filteredChainStatisticalOptionsObj
bool QUESO::MetropolisHastingsSGOptions::m_filteredChainStatOptsInstantiated
std::string QUESO::MetropolisHastingsSGOptions::m_option_algorithm
private

Definition at line 894 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_am_adaptedMatrices_dataOutputAllowAll
private

Definition at line 880 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_am_adaptedMatrices_dataOutputAllowedSet
private

Definition at line 881 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_am_adaptedMatrices_dataOutputFileName
private

Definition at line 878 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_am_adaptedMatrices_dataOutputFileType
private

Definition at line 879 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_am_adaptedMatrices_dataOutputPeriod
private

Definition at line 877 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_am_adaptInterval
private

Definition at line 876 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_am_epsilon
private

See MhOptionsValues::m_amEpsilon.

Definition at line 886 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_am_eta
private

See MhOptionsValues::m_amEta.

Definition at line 884 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_am_initialNonAdaptInterval
private

Definition at line 875 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_am_keepInitialMatrix
private

Definition at line 874 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_BrooksGelmanLag
private

Definition at line 889 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_dataOutputAllowAll
private

Definition at line 834 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_dataOutputAllowedSet
private

Definition at line 835 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_dataOutputFileName
private

Definition at line 833 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_displayCandidates
private

Definition at line 867 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_doLogitTransform
private

Definition at line 893 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_dr_duringAmNonAdaptiveInt
private

Definition at line 873 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_dr_listOfScalesForExtraStages
private

Definition at line 872 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_dr_maxNumExtraStages
private

Definition at line 871 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_enableBrooksGelmanConvMonitor
private

Definition at line 888 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_filteredChain_computeStats
private

Definition at line 865 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_filteredChain_dataOutputAllowAll
private

Definition at line 862 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_filteredChain_dataOutputAllowedSet
private

Definition at line 863 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_filteredChain_dataOutputFileName
private

Definition at line 860 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_filteredChain_dataOutputFileType
private

Definition at line 861 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_filteredChain_discardedPortion
private

Definition at line 858 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_filteredChain_generate
private

Definition at line 857 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_filteredChain_lag
private

Definition at line 859 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_help
private

Definition at line 831 of file MetropolisHastingsSGOptions.h.

std::string QUESO::MetropolisHastingsSGOptions::m_option_initialPosition_dataInputFileName
private

Definition at line 838 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_initialPosition_dataInputFileType
private

Definition at line 839 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_initialProposalCovMatrix_dataInputFileName
private

Definition at line 840 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_initialProposalCovMatrix_dataInputFileType
private

Definition at line 841 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_listOfDisabledParameters
private

Definition at line 842 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_outputLogLikelihood
private

Definition at line 891 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_outputLogTarget
private

Definition at line 892 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_putOutOfBoundsInChain
private

Definition at line 868 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_rawChain_computeStats
private

Definition at line 855 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_rawChain_dataInputFileName
private

Definition at line 843 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_rawChain_dataInputFileType
private

Definition at line 844 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_rawChain_dataOutputAllowAll
private

Definition at line 852 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_rawChain_dataOutputAllowedSet
private

Definition at line 853 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_rawChain_dataOutputFileName
private

Definition at line 850 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_rawChain_dataOutputFileType
private

Definition at line 851 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_rawChain_dataOutputPeriod
private

Definition at line 849 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_rawChain_displayPeriod
private

Definition at line 847 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_rawChain_generateExtra
private

Definition at line 846 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_rawChain_measureRunTimes
private

Definition at line 848 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_rawChain_size
private

Definition at line 845 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_tk
private

Definition at line 895 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_tk_useLocalHessian
private

Definition at line 869 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_tk_useNewtonComponent
private

Definition at line 870 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_totallyMute
private

Definition at line 837 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

std::string QUESO::MetropolisHastingsSGOptions::m_option_updateInterval
private

Definition at line 896 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues().

ScopedPtr<boost::program_options::options_description>::Type QUESO::MetropolisHastingsSGOptions::m_optionsDesc
private

Definition at line 828 of file MetropolisHastingsSGOptions.h.

Referenced by scanOptionsValues().

MhOptionsValues QUESO::MetropolisHastingsSGOptions::m_ov

This class is where the actual options are stored.

Definition at line 807 of file MetropolisHastingsSGOptions.h.

Referenced by getMyOptionValues(), MetropolisHastingsSGOptions(), print(), and scanOptionsValues().

std::string QUESO::MetropolisHastingsSGOptions::m_prefix
SequenceStatisticalOptions* QUESO::MetropolisHastingsSGOptions::m_rawChainStatisticalOptionsObj
bool QUESO::MetropolisHastingsSGOptions::m_rawChainStatOptsInstantiated

The documentation for this class was generated from the following files:

Generated on Sat Apr 22 2017 14:04:40 for queso-0.57.0 by  doxygen 1.8.5