#include <yat/normalizer/Zscore.h>
Public Member Functions | |
template<class InputIterator, class OutputIterator> | |
void | operator() (InputIterator first, InputIterator last, OutputIterator result) const |
Shift and scale the values in a range as: where m is the mean and s is the standard deviation. After normalization, the range will have zero mean and unity variance.
void theplu::yat::normalizer::Zscore::operator() | ( | InputIterator | first, | |
InputIterator | last, | |||
OutputIterator | result | |||
) | const [inline] |
The element in range [result, result + (last-first)) is calculated as result[i] = (first[i] - m) / s where m and std are the mean and standard deviation, respectively, of the range [first, last).
It is possible to centralize a range "in place"; it is permissible for the iterators first and result to be the same.