Interpolates between manhattan distance (norm=1), Euclidean distance (norm=2), and Chebyshev distance (norm=infinity). For nominal attributes, Hamming distance is used.
More...
|
| GLNormDistance (double norm) |
|
| GLNormDistance (GDomNode *pNode) |
|
virtual void | init (const GRelation *pRelation, bool own) |
| See the comment for GDistanceMetric::init. More...
|
|
virtual GDomNode * | serialize (GDom *pDoc) const |
| See the comment for GDistanceMetric::serialize. More...
|
|
void | setDiffWithUnknown (double d) |
| Specify the difference to use when one or more of the values is unknown. (If your data contains unknown values, you may want to normalize the known values to fall within some pre-determined range, so that it will be possible to select a reasonable value for this purpose.) More...
|
|
virtual double | squaredDistance (const double *pA, const double *pB) const |
| Returns the distance (using the norm passed to the constructor) between pA and pB. More...
|
|
| GDistanceMetric () |
|
| GDistanceMetric (GDomNode *pNode) |
|
virtual | ~GDistanceMetric () |
|
double | operator() (const std::vector< double > &a, const std::vector< double > &b) const |
| Return squaredDistance(a,b). Allows dissimilarity metrics to be used as function objects. Do not override. Override squaredDistance(a,b) instead. See GDistanceMetric::squaredDistance(const std::vector<double>&, const std::vector<double>&) More...
|
|
double | operator() (const double *pA, const double *pB) const |
| Return squaredDistance(pA, pB). Allows dissimilarity metrics to be used as function objects. Do not override. Override squaredDistance(pA,pB) instead. See GDistanceMetric::squaredDistance(const double*, const double*) More...
|
|
const GRelation * | relation () const |
| Returns the relation that specifies the meaning of the vector elements. More...
|
|
virtual double * | scaleFactors () |
| Returns a pointer to the vector of scale factors. This may be NULL if the metric does not use scale factors. More...
|
|
virtual double | squaredDistance (const std::vector< double > &a, const std::vector< double > &b) const |
| Return the squared distance (or squared dissimilarity) between the two specified vectors. More...
|
|
Interpolates between manhattan distance (norm=1), Euclidean distance (norm=2), and Chebyshev distance (norm=infinity). For nominal attributes, Hamming distance is used.