1 #ifndef AVG_BACKPROPAGATION_H 2 #define AVG_BACKPROPAGATION_H 4 #include "running_stats.hpp" 5 #include "ibackpropagation_strategy.hpp" 19 virtual double ev()
const {
return stats.mean(); }
21 virtual double std_deviation()
const {
return stats.standard_deviation(); }
23 virtual double variance()
const {
return stats.variance(); }
adds the backpropagated value to a running stats object that calculates the ev, mean and variance.
virtual double variance() const
gets the current variance
virtual double std_deviation() const
gets the current standard deviation
virtual IBackpropagationStrategy * create()
creates a new object of the same type and with the same constructor as the current object.
virtual void on_backpropagate(const double &value)
saves an value according to some metric.
virtual int nb_samples() const
gets the number of samples that are saved in the strat.
A backpropagation strategy is used in each node. when a terminal node is simulated,...
virtual double ev() const
gets the current expected value
void push(const double &x)
add a new value to the object
Computes variance, mean and standart deviation. http://www.johndcook.com/standard_deviation....
long long num_data_values() const
number of samples from which mean etc are calculated