jasonlaska / spherecluster

Clustering routines for the unit sphere
https://medium.com/@jaska_at_clara/simple-datetime-disambiguation-fd2374ce664a
MIT License
331 stars 78 forks source link

TypeError: _labels_inertia() got an unexpected keyword argument 'precompute_distances' #30

Open empty-id opened 4 years ago

empty-id commented 4 years ago

The error occurs after running:

from spherecluster import SphericalKMeans
skm = SphericalKMeans(n_clusters=2)
skm.fit(wv) # wv is a (6, 200) numpy array
Ch4ll3ng3r commented 4 years ago

I get the same error after updating scikit-learn to version 0.23.1. I guess using an older version could be a solution.

rtrad89 commented 4 years ago

Downgrading scikit-learn to 0.22.0 is the most feasible workaround I've found for now.

If you are using Anaconda3, you can do so thus:

 conda install scikit-learn=0.22.0

→ A related issue: #26