yat
0.14.5pre
|
Calculates the Pearson correlation distance between two points given by elements of ranges. More...
#include <yat/statistics/PearsonDistance.h>
Public Member Functions | |
template<typename ForwardIterator1 , typename ForwardIterator2 > | |
double | operator() (ForwardIterator1 beg1, ForwardIterator1 end1, ForwardIterator2 beg2) const |
Calculates the Pearson correlation distance between elements of two ranges. More... | |
Calculates the Pearson correlation distance between two points given by elements of ranges.
This class is modelling the concept Distance.
|
inline |
Calculates the Pearson correlation distance between elements of two ranges.
If elements of both ranges are unweighted the distance is calculated as , where and are the two points and C is the Pearson correlation.
If elements of one or both of ranges have weights the distance is calculated as , where and and are weights for the elements of the first and the second range, respectively, and and correspondingly for . If the elements of one of the two ranges are unweighted, the weights for these elements are set to unity.