GClasses
|
This computes the reciprocal of Euclidean distance, where all missing values are simply ignored.
#include <GDistance.h>
Public Member Functions | |
GEuclidSimilarity () | |
GEuclidSimilarity (GDomNode *pNode) | |
virtual | ~GEuclidSimilarity () |
virtual GDomNode * | serialize (GDom *pDoc) const |
See the comment for GSparseSimilarity::serialize. More... | |
virtual double | similarity (const std::map< size_t, double > &a, const std::map< size_t, double > &b) |
Computes the similarity between two sparse vectors. More... | |
virtual double | similarity (const std::map< size_t, double > &a, const GVec &b) |
Computes the similarity between a sparse and a dense vector. More... | |
virtual double | similarity (const GVec &a, const GVec &b) |
Computes the similarity between two dense vectors. More... | |
Public Member Functions inherited from GClasses::GSparseSimilarity | |
GSparseSimilarity () | |
virtual | ~GSparseSimilarity () |
void | setRegularizer (double d) |
Set a regularizing term to add to the denominator. More... | |
Protected Attributes | |
double | m_squaredMissingPenalty |
Protected Attributes inherited from GClasses::GSparseSimilarity | |
double | m_regularizer |
Additional Inherited Members | |
Static Public Member Functions inherited from GClasses::GSparseSimilarity | |
static GSparseSimilarity * | deserialize (GDomNode *pNode) |
Load from a DOM. More... | |
Protected Member Functions inherited from GClasses::GSparseSimilarity | |
GDomNode * | baseDomNode (GDom *pDoc, const char *szClassName) const |
A helper method used internally. More... | |
|
inline |
|
inline |
|
inlinevirtual |
See the comment for GSparseSimilarity::serialize.
Implements GClasses::GSparseSimilarity.
|
virtual |
Computes the similarity between two sparse vectors.
Implements GClasses::GSparseSimilarity.
|
virtual |
Computes the similarity between a sparse and a dense vector.
Implements GClasses::GSparseSimilarity.
Computes the similarity between two dense vectors.
Implements GClasses::GSparseSimilarity.
|
protected |