GClasses
|
This is a similarity metric that computes the Pearson correlation between two sparse vectors. More...
#include <GDistance.h>
Public Member Functions | |
GPearsonCorrelation () | |
GPearsonCorrelation (GDomNode *pNode) | |
virtual | ~GPearsonCorrelation () |
virtual GDomNode * | serialize (GDom *pDoc) |
See the comment for GSparseSimilarity::serialize. | |
virtual double | similarity (const std::map< size_t, double > &a, const std::map< size_t, double > &b) |
Computes the similarity between two sparse vectors. | |
virtual double | similarity (const std::map< size_t, double > &a, const double *pB) |
Computes the similarity between a sparse and a dense vector. |
This is a similarity metric that computes the Pearson correlation between two sparse vectors.
GClasses::GPearsonCorrelation::GPearsonCorrelation | ( | ) | [inline] |
GClasses::GPearsonCorrelation::GPearsonCorrelation | ( | GDomNode * | pNode | ) | [inline] |
virtual GClasses::GPearsonCorrelation::~GPearsonCorrelation | ( | ) | [inline, virtual] |
See the comment for GSparseSimilarity::serialize.
Implements GClasses::GSparseSimilarity.
virtual double GClasses::GPearsonCorrelation::similarity | ( | const std::map< size_t, double > & | a, |
const double * | pB | ||
) | [virtual] |
Computes the similarity between a sparse and a dense vector.
Implements GClasses::GSparseSimilarity.
virtual double GClasses::GPearsonCorrelation::similarity | ( | const std::map< size_t, double > & | a, |
const std::map< size_t, double > & | b | ||
) | [virtual] |
Computes the similarity between two sparse vectors.
Implements GClasses::GSparseSimilarity.