yat
0.20.3pre
|
Zero mean and unity variance. More...
#include <yat/normalizer/Zscore.h>
Public Member Functions | |
Zscore (double k=1.0) | |
double | k (void) const |
template<class InputIterator , class OutputIterator > | |
void | operator() (InputIterator first, InputIterator last, OutputIterator result) const |
Zero mean and unity variance.
Shift and scale the values in a range as: where m is the mean, s is the standard deviation, and k is set in constructor (default: 1.0). After normalization, the range will have zero mean and variance = .
Type Requirements:
InputIterator
is Data IteratorInputIterator
is Forward Traversal IteratorOutputIterator
is Writable IteratorOutputIterator
is Forward Traversal Iterator
|
explicit |
k | In the scaling step elements are divided by k times the standard deviation |
double theplu::yat::normalizer::Zscore::k | ( | void | ) | 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.