-
Notifications
You must be signed in to change notification settings - Fork 186
Bug: min_cluster_samples should not be set to a non-integer #223
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
Comments
That code block has a final fallback of 2 if none of the previous are available: kepler-mapper/kmapper/kmapper.py Lines 506 to 511 in 56dbd66
|
Also, here's an example of someone using AgglomerativeClustering #185 (comment) , what error message are you getting? Full stack trace please? |
I tried this clustering method: Traceback (most recent call last): I think the error makes sense, since n_clusters is set, just not to an integer. The documentation of AgglomerativeClustering says that n_clusters has to be set to None if distance_threshold is set. Perhaps you can check whether the parameter is an integer and if not, set it to 2 instead? |
Indeed! Thanks for the bug report.I remember now that @torlarse had hard-coded kmapper to use min_cluster_samples = 2 when they posted the code in that comment. Maybe you can try that until a patch is released? |
agglomerative clustering was failing because the old way of checking the clusterer for a setting for `min_cluster_samples` didn't ensure that the value, if set, was an int (it is `None` for agglomerative clustering) closes #223
Is your feature request related to a problem? Please describe.
KeplerMapper does not work in combination with sklearn.clustering.AgglomerativeClustering (using distance_threshold). It seems that KeplerMapper relies on the parameter "min_clusters/n_clusters/min_samples" to be available (kmapper.py, line 506).
Describe the solution you'd like
The documentation should be more clear about what is expected from the clustering method to work in KeplerMapper.
The text was updated successfully, but these errors were encountered: