25 #ifndef UQ_SEQUENCE_STATISTICAL_OPTIONS_H
26 #define UQ_SEQUENCE_STATISTICAL_OPTIONS_H
28 #include <queso/Defines.h>
30 #ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
32 #include <queso/Environment.h>
33 #include <queso/BoostInputOptionsParser.h>
35 #define UQ_SEQUENCE_INITIAL_DISCARDED_PORTIONS_ODV "0."
36 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
37 #define UQ_SEQUENCE_MEAN_MONITOR_PERIOD_ODV 0
38 #define UQ_SEQUENCE_BMM_RUN_ODV 0
39 #define UQ_SEQUENCE_BMM_LENGTHS_ODV "0"
40 #define UQ_SEQUENCE_BMM_DISPLAY_ODV 0
41 #define UQ_SEQUENCE_BMM_WRITE_ODV 0
42 #define UQ_SEQUENCE_FFT_COMPUTE_ODV 0
43 #define UQ_SEQUENCE_FFT_PARAM_ID_ODV 0
44 #define UQ_SEQUENCE_FFT_SIZE_ODV 2048
45 #define UQ_SEQUENCE_FFT_TEST_INVERSION_ODV 0
46 #define UQ_SEQUENCE_FFT_WRITE_ODV 0
47 #define UQ_SEQUENCE_PSD_COMPUTE_ODV 0
48 #define UQ_SEQUENCE_PSD_NUM_BLOCKS_ODV 8
49 #define UQ_SEQUENCE_PSD_HOP_SIZE_RATIO_ODV 0.
50 #define UQ_SEQUENCE_PSD_PARAM_ID_ODV 0
51 #define UQ_SEQUENCE_PSD_WRITE_ODV 0
52 #define UQ_SEQUENCE_PSD_AT_ZERO_COMPUTE_ODV 0
53 #define UQ_SEQUENCE_PSD_AT_ZERO_NUM_BLOCKS_ODV "8"
54 #define UQ_SEQUENCE_PSD_AT_ZERO_HOP_SIZE_RATIO_ODV .5
55 #define UQ_SEQUENCE_PSD_AT_ZERO_DISPLAY_ODV 0
56 #define UQ_SEQUENCE_PSD_AT_ZERO_WRITE_ODV 0
57 #define UQ_SEQUENCE_GEWEKE_COMPUTE_ODV 0
58 #define UQ_SEQUENCE_GEWEKE_NA_RATIO_ODV .1
59 #define UQ_SEQUENCE_GEWEKE_NB_RATIO_ODV .5
60 #define UQ_SEQUENCE_GEWEKE_DISPLAY_ODV 0
61 #define UQ_SEQUENCE_GEWEKE_WRITE_ODV 0
62 #define UQ_SEQUENCE_MEAN_STACC_COMPUTE_ODV 0
63 #define UQ_SEQUENCE_HIST_COMPUTE_ODV 0
64 #define UQ_SEQUENCE_HIST_NUM_INTERNAL_BINS_ODV 100
65 #define UQ_SEQUENCE_CDF_STACC_COMPUTE_ODV 0
66 #define UQ_SEQUENCE_CDF_STACC_NUM_EVAL_POSITIONS_ODV 50
68 #define UQ_SEQUENCE_AUTO_CORR_COMPUTE_VIA_DEF_ODV 0
69 #define UQ_SEQUENCE_AUTO_CORR_COMPUTE_VIA_FFT_ODV 0
70 #define UQ_SEQUENCE_AUTO_CORR_SECOND_LAG_ODV 0
71 #define UQ_SEQUENCE_AUTO_CORR_LAG_SPACING_ODV 0
72 #define UQ_SEQUENCE_AUTO_CORR_NUM_LAGS_ODV 0
73 #define UQ_SEQUENCE_AUTO_CORR_DISPLAY_ODV 0
74 #define UQ_SEQUENCE_AUTO_CORR_WRITE_ODV 0
75 #define UQ_SEQUENCE_KDE_COMPUTE_ODV 0
76 #define UQ_SEQUENCE_KDE_NUM_EVAL_POSITIONS_ODV 100
77 #define UQ_SEQUENCE_COV_MATRIX_COMPUTE_ODV 0
78 #define UQ_SEQUENCE_CORR_MATRIX_COMPUTE_ODV 0
81 namespace program_options {
82 class options_description;
162 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
222 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
278 const std::string& prefix);
284 const std::string& prefix,
332 void print(std::ostream& os)
const;
341 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
346 const std::vector<unsigned int>&
bmmLengths()
const;
385 void defineMyOptions (boost::program_options::options_description& optionsDesc)
const;
388 void getMyOptionValues(boost::program_options::options_description& optionsDesc);
409 #ifdef QUESO_COMPUTES_EXTRA_POST_PROCESSING_STATISTICS
446 #endif // ifdef QUESO_USES_SEQUENCE_STATISTICAL_OPTIONS
448 #endif // UQ_SEQUENCE_STATISTICAL_OPTIONS_H
bool psdAtZeroWrite() const
std::string m_option_initialDiscardedPortions
std::string m_option_psdAtZero_numBlocks
SsOptionsValues & operator=(const SsOptionsValues &rhs)
Assignment operator; it copies rhs to this.
std::string m_option_fft_testInversion
unsigned int psdNumBlocks() const
std::string m_option_geweke_naRatio
std::string m_option_help
std::string m_option_psd_hopSizeRatio
unsigned int kdeNumEvalPositions() const
Returns number of evaluation positions for KDE. Access to private attribute m_kdeNumEvalPositions.
bool psdAtZeroDisplay() const
double psdAtZeroHopSizeRatio() const
std::string m_option_cdfStacc_compute
std::string m_option_psdAtZero_hopSizeRatio
std::string m_option_kde_numEvalPositions
std::string m_option_cdfStacc_compute
std::string m_option_bmm_lengths
std::string m_option_geweke_naRatio
A templated class that stores default statistical options for a sequence of vectors, e.g. a Markov chain, a Monte Carlo input sequence, or a Monte Carlo output sequence.
std::string m_option_autoCorr_secondLag
std::string m_option_meanStacc_compute
std::string m_option_fft_size
unsigned int m_fftParamId
bool meanStaccCompute() const
std::string m_option_autoCorr_computeViaFft
std::string m_option_bmm_display
std::string m_option_corrMatrix_compute
void copy(const SsOptionsValues &src)
Copies the option values from src to this.
bool kdeCompute() const
Computes KDE. Access to private attribute m_kdeCompute.
bool autoCorrWrite() const
Writes autocorrelation. Access to private attribute m_autoCorrWrite.
unsigned int m_histNumInternalBins
std::vector< unsigned int > m_psdAtZeroNumBlocks
unsigned int m_meanMonitorPeriod
const std::vector< unsigned int > & bmmLengths() const
std::string m_option_autoCorr_computeViaFft
std::string m_option_psd_compute
std::vector< unsigned int > m_bmmLengths
std::string m_option_bmm_run
std::string m_option_autoCorr_display
unsigned int autoCorrNumLags() const
Returns the number of lags of the autocorrelation. Access to private attribute m_autoCorrNumLags.
std::string m_option_fft_write
std::string m_option_psdAtZero_compute
std::string m_option_kde_numEvalPositions
std::string m_option_fft_write
std::string m_option_autoCorr_lagSpacing
bool cdfStaccCompute() const
const std::vector< unsigned int > & psdAtZeroNumBlocks() const
std::string m_option_fft_compute
std::string m_option_hist_numInternalBins
std::string m_option_bmm_write
std::string m_option_psd_numBlocks
std::string m_option_cdfStacc_numEvalPositions
bool autoCorrComputeViaDef() const
Compute autocorrelation via definition. Access to private attribute m_autoCorrComputeViaDef.
std::string m_option_bmm_lengths
unsigned int autoCorrSecondLag() const
Returns the second lag of the autocorrelation. Access to private attribute m_autoCorrSecondLag.
std::string m_option_hist_compute
std::string m_option_help
bool m_autoCorrComputeViaFft
Whether or not compute autocorrelation via FFT.
virtual ~SsOptionsValues()
Destructor.
std::string m_option_kde_compute
unsigned int autoCorrLagSpacing() const
Returns the spacing of the autocorrelation. Access to private attribute m_autoCorrLagSpacing.
std::string m_option_cdfStacc_numEvalPositions
double gewekeNaRatio() const
std::string m_option_psd_hopSizeRatio
std::string m_option_fft_size
boost::program_options::options_description * m_optionsDesc
unsigned int m_autoCorrNumLags
Number of lags of the autocorrelation.
unsigned int cdfStaccNumEvalPositions() const
std::string m_option_psdAtZero_numBlocks
A templated class that stores statistical options (optionally read from an input file) ...
std::string m_option_geweke_write
SequenceStatisticalOptions(const BaseEnvironment &env, const std::string &prefix)
Constructor: reads options from the input file.
std::string m_option_geweke_write
bool gewekeCompute() const
unsigned int m_kdeNumEvalPositions
Number of positions to evaluate kde.
bool m_covMatrixCompute
Whether or not compute covariance matrix.
std::string m_option_psdAtZero_hopSizeRatio
std::string m_option_geweke_compute
std::string m_option_fft_testInversion
unsigned int psdParamId() const
std::string m_option_autoCorr_display
unsigned int fftSize() const
std::string m_option_psdAtZero_display
void defineMyOptions(boost::program_options::options_description &optionsDesc) const
Defines the options for the chain.
SsOptionsValues()
Default constructor.
std::string m_option_mean_monitorPeriod
bool autoCorrDisplay() const
Displays autocorrelation. Access to private attribute m_autoCorrDisplay.
unsigned int m_psdNumBlocks
~SequenceStatisticalOptions()
Destructor.
std::string m_option_fft_paramId
unsigned int m_autoCorrLagSpacing
Lag spacing of the autocorrelation.
std::string m_option_psdAtZero_compute
std::string m_option_autoCorr_numLags
std::string m_option_autoCorr_write
std::string m_option_geweke_compute
std::string m_option_autoCorr_computeViaDef
unsigned int histNumInternalBins() const
bool autoCorrComputeViaFft() const
Compute autocorrelation via FFT. Access to private attribute m_autoCorrComputeViaFft.
double gewekeNbRatio() const
std::string m_option_psd_compute
std::string m_option_autoCorr_numLags
std::vector< double > m_initialDiscardedPortions
Stores the initial discarded portion of the chain.
bool fftTestInversion() const
void print(std::ostream &os) const
Prints the initial discarded portion of the chain; and, optionally, other attributes of the chain...
std::string m_option_fft_compute
std::string m_option_psdAtZero_write
void getMyOptionValues(boost::program_options::options_description &optionsDesc)
Reads the chain options.
std::string m_option_geweke_nbRatio
std::string m_option_mean_monitorPeriod
std::string m_option_kde_compute
const BaseEnvironment & m_env
std::string m_option_hist_numInternalBins
std::string m_option_autoCorr_secondLag
std::string m_option_fft_paramId
bool psdAtZeroCompute() const
unsigned int fftParamId() const
std::string m_option_meanStacc_compute
std::string m_option_psdAtZero_display
std::string m_option_corrMatrix_compute
std::string m_option_psd_write
unsigned int m_cdfStaccNumEvalPositions
std::string m_option_covMatrix_compute
std::string m_option_autoCorr_lagSpacing
std::string m_option_covMatrix_compute
double m_psdAtZeroHopSizeRatio
bool m_corrMatrixCompute
Whether or not compute correlation matrix.
unsigned int meanMonitorPeriod() const
std::string m_option_geweke_display
bool m_autoCorrDisplay
Whether or not display autocorrelation.
std::string m_option_psd_paramId
std::string m_option_geweke_display
std::string m_option_bmm_display
bool m_kdeCompute
Whether or not compute kernel density estimate (kde).
std::ostream & operator<<(std::ostream &os, const SequenceStatisticalOptions &obj)
bool gewekeDisplay() const
std::string m_option_hist_compute
double psdHopSizeRatio() const
std::string m_option_bmm_run
std::string m_option_bmm_write
bool m_autoCorrComputeViaDef
Whether or not compute autocorrelation via definition.
std::string m_option_initialDiscardedPortions
std::string m_option_psd_write
const std::vector< double > & initialDiscardedPortions() const
Finds the initially discarded portion of the chain. Access to private attribute m_initialDiscardedPor...
std::string m_option_psd_paramId
unsigned int m_psdParamId
std::string m_option_autoCorr_computeViaDef
BoostInputOptionsParser * m_parser
unsigned int m_autoCorrSecondLag
Second lag of the autocorrelation.
std::string m_option_psdAtZero_write
bool corrMatrixCompute() const
Finds the correlation matrix. Access to private attribute m_corrMatrixCompute.
std::string m_option_geweke_nbRatio
std::string m_option_autoCorr_write
std::string m_option_psd_numBlocks
bool covMatrixCompute() const
Finds the covariance matrix. Access to private attribute m_covMatrixCompute.
bool m_autoCorrWrite
Whether or not write autocorrelation to file.