Does ball tree work with any metric?
It says on the Github readme that ball tree works with any metric; I was using it with a custom metric over discrete vectors (like hamming distance) and noticed that it may be generating centroids that are not discrete; thus, such centroid may be equidistant to all points in hamming space.
As long as the triangle inequality is fulfilled it should work in theory. Would have to look at a specific example to say anything more.
It's been some time for me to remember the details of what I was doing but I think was pointing out that my understanding suggests that ball tree doesn't necessarily work for discrete metrics; however, it is mentioned in the README that it works for all metrics.