Skip to content
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

Support p values other than 2 for minkowski #637

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smartIU
Copy link

@smartIU smartIU commented May 24, 2024

Suggested quick fix to use p values other than 2 for minkowski. Setting _metric_kwargs in init is for use in generate_prediction_data() and weighted_cluster_medoid().

Suggested quick fix to use p values other than 2 for minkowski.
Setting _metric_kwargs in __init__ is for use in generate_prediction_data() and weighted_cluster_medoid()
@lmcinnes
Copy link
Collaborator

This seems to break the boruvka KDTrees, which don't seem to support taking a p value. You may need a further workaround (use ball trees) in that case.

@smartIU
Copy link
Author

smartIU commented May 24, 2024

Thanks for the info.
I've been testing with hdbscan 0.8.33, Cython 0.29.37, scikit-learn 1.4.1.post1, scipy 1.12.0 and numpy 1.24.3.
Here _hdbscan_boruvka_kdtree() definitely works, outputting different results for different p values.

Will set up a new environment and find out why it fails in newer versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants