yat  0.14.5pre
Public Member Functions | List of all members
theplu::yat::statistics::PearsonCorrelation Class Reference

Class for calculating Pearson correlation. More...

#include <yat/statistics/PearsonCorrelation.h>

Public Member Functions

 PearsonCorrelation (void)
 The default constructor.
 
virtual ~PearsonCorrelation (void)
 The destructor.
 
void add (double value, bool target, double weight=1.0)
 
double score (void) const
 correlation More...
 
double p_value_one_sided (void) const
 
double p_left (void) const
 
double p_right (void) const
 
double p_value (void) const
 

Detailed Description

Class for calculating Pearson correlation.

Member Function Documentation

void theplu::yat::statistics::PearsonCorrelation::add ( double  value,
bool  target,
double  weight = 1.0 
)

Adding a data value to PearsonCorrelation.

double theplu::yat::statistics::PearsonCorrelation::p_left ( void  ) const

Similar to p_right, but returns probability to get observed correlation or less.

Since
New in yat 0.11
double theplu::yat::statistics::PearsonCorrelation::p_right ( void  ) const

The p-value is the probability of getting a correlation as large (or larger) as the observed value by random chance, when the true correlation is zero (and the data is Gaussian).

P-value is calculated using function pearson_p_value(double, unsigned int) where degrees of freedom is calculated using n(void) in AveragerPairWeighted.

Returns
one-sided p-value
Since
New in yat 0.11
double theplu::yat::statistics::PearsonCorrelation::p_value ( void  ) const

Claculates the probability to get correlation greater than |r| or less than -|r|.

Returns
two-sided p-value
Since
New in yat 0.11
double theplu::yat::statistics::PearsonCorrelation::p_value_one_sided ( void  ) const
Deprecated:
Provided for backward compatibility with the 0.10 API. Use p_right(void).
double theplu::yat::statistics::PearsonCorrelation::score ( void  ) const

correlation

Correlation is calculated as implemented in AveragerPairWeighted

Returns
Pearson correlation.

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

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