This uses a combination of Euclidean distance for continuous attributes, and Hamming distance for nominal attributes. This version honors scale factors given by the user. See comments on GRowDistance.
More...
|
| | GRowDistanceScaled () |
| |
| | GRowDistanceScaled (GDomNode *pNode) |
| |
| virtual | ~GRowDistanceScaled () |
| |
| virtual void | init (const GRelation *pRelation, bool own) |
| | See the comment for GDistanceMetric::init. More...
|
| |
| virtual double * | scaleFactors () |
| | Returns the vector of scalar values associated with each dimension. More...
|
| |
| virtual GDomNode * | serialize (GDom *pDoc) const |
| | See the comment for GDistanceMetric::serialize. More...
|
| |
| virtual double | squaredDistance (const double *pA, const double *pB) const |
| | Returns the scaled distance 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 | 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...
|
| |
This uses a combination of Euclidean distance for continuous attributes, and Hamming distance for nominal attributes. This version honors scale factors given by the user. See comments on GRowDistance.