yat  0.21pre
Public Member Functions | List of all members
theplu::yat::normalizer::Zscore Class Reference

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
 

Detailed Description

Zero mean and unity variance.

Shift and scale the values in a range as: $ y_i = \frac{x_i-m}{k*s} $ 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 = $ 1/k^2 $.

Type Requirements:

Since
New in yat 0.5

Constructor & Destructor Documentation

◆ Zscore()

theplu::yat::normalizer::Zscore::Zscore ( double  k = 1.0)
explicit
Parameters
kIn the scaling step elements are divided by k times the standard deviation
Since
New in yat 0.19

Member Function Documentation

◆ k()

double theplu::yat::normalizer::Zscore::k ( void  ) const
Returns
the k-factor set in constructor
Since
new in yat 0.19

◆ operator()()

template<class InputIterator , class OutputIterator >
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.

See also
std::transform

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

Generated on Wed Jan 25 2023 03:34:29 for yat by  doxygen 1.8.14