It is explicitlly limited to the available options in the MinkowskiMetric type:
const MinkowskiMetric = Union{Euclidean,Chebyshev,Cityblock,Minkowski,WeightedEuclidean,WeightedCityblock,WeightedMinkowski}
This is somewhat explained earlier in the README, but adding this to the parameter definition would help.
The README seems to claim that custom Metrics are supported for the
metric
parameter, but this is not true for KDTree: https://github.com/KristofferC/NearestNeighbors.jl/blob/master/README.md?plain=1#L35It is explicitlly limited to the available options in the
MinkowskiMetric
type:const MinkowskiMetric = Union{Euclidean,Chebyshev,Cityblock,Minkowski,WeightedEuclidean,WeightedCityblock,WeightedMinkowski}
This is somewhat explained earlier in the README, but adding this to the parameter definition would help.