mcpele
1.0.0
The Monte Carlo Python Energy Landscape Explorer
|
#include <record_scalar_timeseries.h>
Public Member Functions | |
RecordScalarTimeseries (const size_t, const size_t) | |
virtual | ~RecordScalarTimeseries () |
virtual void | action (pele::Array< double > &coords, double energy, bool accepted, MC *mc) |
virtual double | get_recorded_scalar (pele::Array< double > &coords, const double energy, const bool accepted, MC *mc)=0 |
bool | moving_average_is_stable (const size_t nr_steps_to_check=1000, const double rel_std_threshold=0.1) |
std::pair< double, double > | get_moving_average_mean (const size_t nr_steps_to_check) |
std::pair< double, double > | get_moving_average_variance (const size_t nr_steps_to_check) |
pele::Array< double > | get_time_series () |
void | clear () |
Record scalar time series, every record_every-th step.
Definition at line 11 of file record_scalar_timeseries.h.
mcpele::RecordScalarTimeseries::RecordScalarTimeseries | ( | const size_t | niter, |
const size_t | record_every | ||
) |
Definition at line 8 of file record_scalar_timeseries.cpp.
virtual mcpele::RecordScalarTimeseries::~RecordScalarTimeseries | ( | ) | [inline, virtual] |
Definition at line 21 of file record_scalar_timeseries.h.
void mcpele::RecordScalarTimeseries::action | ( | pele::Array< double > & | coords, |
double | energy, | ||
bool | accepted, | ||
MC * | mc | ||
) | [virtual] |
Implements mcpele::Action.
Definition at line 17 of file record_scalar_timeseries.cpp.
void mcpele::RecordScalarTimeseries::clear | ( | ) | [inline] |
Definition at line 32 of file record_scalar_timeseries.h.
std::pair< double, double > mcpele::RecordScalarTimeseries::get_moving_average_mean | ( | const size_t | nr_steps_to_check | ) |
Definition at line 55 of file record_scalar_timeseries.cpp.
std::pair< double, double > mcpele::RecordScalarTimeseries::get_moving_average_variance | ( | const size_t | nr_steps_to_check | ) |
Definition at line 69 of file record_scalar_timeseries.cpp.
virtual double mcpele::RecordScalarTimeseries::get_recorded_scalar | ( | pele::Array< double > & | coords, |
const double | energy, | ||
const bool | accepted, | ||
MC * | mc | ||
) | [pure virtual] |
pele::Array<double> mcpele::RecordScalarTimeseries::get_time_series | ( | ) | [inline] |
Definition at line 27 of file record_scalar_timeseries.h.
bool mcpele::RecordScalarTimeseries::moving_average_is_stable | ( | const size_t | nr_steps_to_check = 1000 , |
const double | rel_std_threshold = 0.1 |
||
) |
Apply a basic check on the behaviour of the moving average of the recorded time series to decide if it is sufficiently stable. Parameters: nr_steps_to_check is the number of steps, from the present into the past, that are considered for the moving average check. rel_std_threshold is the relative size of the fluctuations in the moving average that is considered stable. Decreasing that number should make the test more sensitive. NOTE: we do not test the variance because the variance has some functional dependence on the mean var = f(mu). In order to remove this one would require a "variance stabilising transformation" which would require the implementation of a different moments class where f(x) si stored giving an approximately constant variance as a function of the mean. See Ascombe transform for instance.
Definition at line 40 of file record_scalar_timeseries.cpp.