gagolews / genieclust

Genie: Fast and Robust Hierarchical Clustering with Noise Point Detection - in Python and R
https://genieclust.gagolewski.com
Other
58 stars 10 forks source link

ValueError: incorrect n_clusters #85

Closed chrico-bu-uab closed 9 months ago

chrico-bu-uab commented 9 months ago

What is the source of this error? I could not find it in any source code.

Thanks!

chrico-bu-uab commented 9 months ago

I think I figured it out - this error appears to be the result of selecting a value of n_clusters that exceeds the number of points to cluster.

gagolews commented 9 months ago

Yes, one of the conditions in internal.pyx is:

if not 0 <= n_clusters <= n:
        raise ValueError("incorrect n_clusters")