26 bool InitFromConfig(
const YAML::Node& adapt_manager,
const std::string& matrix_name_str,
27 const std::vector<double>* parameters,
const std::vector<double>* fixed);
37 void SaveAdaptiveToFile(
const std::string& outFileName,
const std::string& systematicName,
const bool is_final=
false);
44 const std::string& matrix_name,
45 const std::string& means_name,
77 return static_cast<int>(
_fCurrVal->size());
89 double CurrVal(
const int par_index);
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.
double CurrVal(const int par_index)
Get Current value of parameter.
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.
int GetTotalSteps() const
Get Total Number of Steps.
std::string output_file_name
Name of the file to save the adaptive matrices into.
bool AdaptionUpdate()
To be fair not a clue...
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.
void SetAdaptiveBlocks(const std::vector< std::vector< int > > &block_indices)
HW: sets adaptive block matrix.
const std::vector< double > * _fCurrVal
Current values of parameters.
void Print()
Print all class members.
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.
bool IndivStepScaleAdapt()
Tell whether we want reset step scale or not.
int adaptive_save_n_iterations
const std::vector< double > * _fFixedPars
Vector of fixed parameters.
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!
int end_adaptive_update
Steps between changing throw matrix.
int total_steps
Total number of MCMC steps.
void UpdateAdaptiveCovariance()
Method to update adaptive MCMC .
int adaptive_update_step
Steps between changing throw matrix.
TMatrixDSym * GetAdaptiveCovariance() const
Increase by one number of total steps.
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
int GetNumParams() const
Get the current values of the parameters.
bool SkipAdaption()
Tell if we are Skipping Adaption.
TMatrixDSym * adaptive_covariance
Full adaptive covariance matrix.
void IncrementNSteps()
Increase by one number of total steps.
std::string GetOutFileName() const
Get Name of Output File.
std::vector< double > GetParameterMeans() const
Get the parameter means used in the adaptive handler.