Skip to content

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