shark::NormalTrainer Class Reference

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...
 

Detailed Description

Trainer for normal distribution.

Definition at line 52 of file NormalTrainer.h.

Member Enumeration Documentation

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.

Constructor & Destructor Documentation

shark::NormalTrainer::NormalTrainer ( VarianceType  varianceType = VARIANCE_BY_SAMPLE)
inline

Constructor.

Definition at line 67 of file NormalTrainer.h.

Member Function Documentation

template<typename RngType >
void shark::NormalTrainer::train ( Normal< RngType > &  normal,
const std::vector< double > &  input 
) const
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.


The documentation for this class was generated from the following file: