Trainer for normal distribution. More...
#include <shark/Algorithms/Trainers/Distribution/NormalTrainer.h>
Public Types | |
enum | VarianceType { VARIANCE_BY_POPULATION, VARIANCE_BY_SAMPLE } |
Public Member Functions | |
NormalTrainer (VarianceType varianceType=VARIANCE_BY_SAMPLE) | |
Constructor. More... | |
template<typename RngType > | |
void | train (Normal< RngType > &normal, const std::vector< double > &input) const |
Internal implementation for trainer of normal distribution. More... | |
Trainer for normal distribution.
Definition at line 52 of file NormalTrainer.h.
The type of variance. The difference between them is: When you have "N" data values that are: By Population: divide by N when calculating Variance By Sample: divide by N-1 when calculating Variance
Enumerator | |
---|---|
VARIANCE_BY_POPULATION | |
VARIANCE_BY_SAMPLE |
Definition at line 60 of file NormalTrainer.h.
|
inline |
Constructor.
Definition at line 67 of file NormalTrainer.h.
|
inline |
Internal implementation for trainer of normal distribution.
Definition at line 71 of file NormalTrainer.h.
References shark::mean(), shark::Normal< RngType >::mean(), SIZE_CHECK, shark::variance(), shark::Normal< RngType >::variance(), and VARIANCE_BY_SAMPLE.