31 bool InitFromConfig(
const YAML::Node& adapt_manager,
const std::string& matrix_name_str,
32 const std::vector<double>* parameters,
const std::vector<double>* fixed);
42 void SaveAdaptiveToFile(
const std::string& outFileName,
const std::string& systematicName,
const bool is_final=
false);
49 const std::string& matrix_name,
50 const std::string& means_name,
76 void SetFixed(
const std::vector<double>* fix) {
83 return static_cast<int>(
_fCurrVal->size());
95 double CurrVal(
const int par_index)
const;
Contains information about adaptive covariance matrix .
std::vector< double > par_means
Mean values for all parameters.
bool IsFixed(const int ipar) const
Check if a parameter is fixed.
bool UpdateMatrixAdapt()
Tell whether matrix should be updated.
std::vector< int > adapt_block_matrix_indices
Indices for block-matrix adaption.
bool InitFromConfig(const YAML::Node &adapt_manager, const std::string &matrix_name_str, const std::vector< double > *parameters, const std::vector< double > *fixed)
Read initial values from config file.
std::string output_file_name
Name of the file to save the adaptive matrices into.
double adaption_scale
Scaling factor.
void SaveAdaptiveToFile(const std::string &outFileName, const std::string &systematicName, const bool is_final=false)
HW: Save adaptive throw matrix to file.
const std::vector< double > * _fCurrVal
Current values of parameters.
int start_adaptive_update
When do we stop update the adaptive matrix.
std::vector< int > adapt_block_sizes
Size of blocks for adaption.
virtual ~AdaptiveMCMCHandler()
Destructor.
int adaptive_save_n_iterations
const std::vector< double > * _fFixedPars
Vector of fixed parameters.
bool IndivStepScaleAdapt() const
Tell whether we want reset step scale or not.
void SetFixed(const std::vector< double > *fix)
Set the fixed parameters.
void SetParams(const std::vector< double > *params)
Set the current values of the parameters.
void SetTotalSteps(const int nsteps)
Change Total Number of Steps to new value.
AdaptiveMCMCHandler()
Constructor.
void CreateNewAdaptiveCovariance()
If we don't have a covariance matrix to start from for adaptive tune we need to make one!
bool SkipAdaption() const
Tell if we are Skipping Adaption.
int end_adaptive_update
Steps between changing throw matrix.
int total_steps
Total number of MCMC steps.
void Print() const
Print all class members.
void UpdateAdaptiveCovariance()
Method to update adaptive MCMC .
double CurrVal(const int par_index) const
Get Current value of parameter.
int adaptive_update_step
Steps between changing throw matrix.
bool AdaptionUpdate() const
To be fair not a clue...
void SetAdaptiveBlocks(const std::vector< std::vector< int >> &block_indices)
HW: sets adaptive block matrix.
void SetThrowMatrixFromFile(const std::string &matrix_file_name, const std::string &matrix_name, const std::string &means_name, bool &use_adaptive)
sets throw matrix from a file
TMatrixDSym * adaptive_covariance
Full adaptive covariance matrix.
void IncrementNSteps()
Increase by one number of total steps.
int GetTotalSteps() const
Get Total Number of Steps.
TMatrixDSym * GetAdaptiveCovariance() const
Increase by one number of total steps.
std::string GetOutFileName() const
Get Name of Output File.
int GetNumParams() const
Get the current values of the parameters.
std::vector< double > GetParameterMeans() const
Get the parameter means used in the adaptive handler.