Question

The docs for sklearn.neighbors.DistanceMetric state that

in order to be used within the BallTree, the distance must be a true metric

(i.e. be non-negative, 0 only if objects are equal, symmetric, and satisfy triangle inequality). My question is, how strict are those requirements? More specifically, would ball tree work for pseudometric (may be 0 for non-equal objects but satisfies other conditions)?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with datascience.stackexchange
scroll top