-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trees for non-Metrics? #75
Comments
This would come in handy for using NearestNeighbors
function get_cluster_assignments_nearest_neighbors(
X::Matrix{T},
centers::Matrix{T},
distance::SemiMetric=SqEuclidean(), # in: function to calculate distance with
) where {F<:Function,T}
brutetree = BruteTree(centers, distance)
idx, distances = knn(brutetree, X, 1)
return idx
end I asked for this in this PR JuliaStats/Clustering.jl#238 but the idea was to leverage something like |
|
For NLP it is common to want to use
CosineDist
,which is a
SemiMetric
.This is not going to be compatible with the BallTree, I think.
but it should be fine with the
BruteTree
.The text was updated successfully, but these errors were encountered: