-
Notifications
You must be signed in to change notification settings - Fork 540
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
[FEA] Add Cosine Distance metric to DBSCAN #4210
Comments
This issue has been labeled |
This issue has been labeled |
closes #4210 Added cosine distance metric for computing epsilon neighborhood in DBSCAN. The cosine distance computed as L2 norm of L2 normalized vectors and the epsilon value is adjusted accordingly. Authors: - Tarang Jain (https://github.com/tarang-jain) Approvers: - Corey J. Nolet (https://github.com/cjnolet) URL: #4776
closes rapidsai#4210 Added cosine distance metric for computing epsilon neighborhood in DBSCAN. The cosine distance computed as L2 norm of L2 normalized vectors and the epsilon value is adjusted accordingly. Authors: - Tarang Jain (https://github.com/tarang-jain) Approvers: - Corey J. Nolet (https://github.com/cjnolet) URL: rapidsai#4776
Cosine distance metric is not part of the DBSCAN metric.
https://docs.rapids.ai/api/cuml/stable/api.html#dbscan
Pairwise distances does support the cosine metric :
https://docs.rapids.ai/api/cuml/stable/api.html?highlight=pairwise%20distances#module-cuml.metrics.pairwise_distances
I think it should be quite easy to add cosine distance since DistanceType already has CosineExpanded "raft::distance::DistanceType::CosineExpanded".
I tried making these changes locally but I'm facing issues when I build from source and wasn't successful.
I tried 'precomputed' method of DBSCAN by passing a square cosine distance metric, but this leads to out of memory issues once the size of the vectors increase since a N*N matrix is required.
The text was updated successfully, but these errors were encountered: