yat  0.14.5pre
Public Member Functions | List of all members
theplu::yat::normalizer::Spearman Class Reference

Replace elements with normalized rank. More...

#include <yat/normalizer/Spearman.h>

Public Member Functions

 Spearman (void)
 default constructor
 
template<typename RandomAccessIter1 , typename RandomAccessIter2 >
void operator() (RandomAccessIter1 first, RandomAccessIter1 last, RandomAccessIter2 result) const
 

Detailed Description

Replace elements with normalized rank.

Each element x is replaced by $ \frac{\sum I(x_i-x) w_i}{\sum w_i} $ where $ I(x) = 1 $ for $ x>0 $, $I(x) = 0.5 $ for $ x=0 $, and $ I(x) = 0 $ for $ x<0 $.

Since
New in yat 0.5

Member Function Documentation

template<typename RandomAccessIter1 , typename RandomAccessIter2 >
void theplu::yat::normalizer::Spearman::operator() ( RandomAccessIter1  first,
RandomAccessIter1  last,
RandomAccessIter2  result 
) const
inline

It is possible to centralize a range "in place"; it is permissible for the iterators first and result to be the same.

Type Requirements:


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

Generated on Tue Sep 26 2017 02:33:29 for yat by  doxygen 1.8.5