Comments (8)
I changed from sklearn.cluster import _k_means
to from sklearn.cluster import _k_means_fast as _k_means
but got another exception
conda/pip install scikit-learn==0.20.0
may be a better way if the pip package is not up to date
check this issue for more details #26
from spherecluster.
thank you, it fix my bugs
from spherecluster.
Yeah, similar issue here. The package sklearn.externals.joblib was removed from sklearn in version 0.23 so I have to downgrade to be able to use spherecluster again.
from spherecluster.
@jasonlaska @dominikstrb @cv3d Thanks again for providing this package, but are you interested in additional help in maintaining this project? If additional people could be added to the repo and the pypi account other members of the community can help fix some of these minor incompatibilities
from spherecluster.
Hi @AndrewAnnex I only fixed some imports a couple of months ago, as far as I can remember. If there is anything I can do to help, I am happy to!
from spherecluster.
hey @dominikstrb, I think the most pressing thing would be to fix any remaining issues spherecluster running against newer releases of sklearn and cut a new release for pypi to fix existing issues. I am happy to contribute a conda-forge recipe for spherecluster once that is setup.
from spherecluster.
The biggest problem is that the implementation of k-means was changed in sklearn 0.23.2: scikit-learn/scikit-learn#11950
The internals of the implementation are now very different and it does seem like more than a minor fix in the spherecluster codebase is necessary to accomodate these changes, since spherecluster does not only use the public sklearn api, but the internals of the k-means implementation including functions like _centers_dense
, which do not exist anymore since the commit I referenced.
I'm not familiar enough with the current sklearn k-means implementation, but maybe @jeremiedbb, who did that overhaul of k-means can help us.
from spherecluster.
I'm not sure I can help you. Basically we can't guarantee that the private api won't change in the future. I'd advise you to only rely on the public api or reimplement all the private parts of the api you need.
In your case it looks like a huge amount of stuff to reimplement while you're just adding a single line in kmeans_single_lloyd
.
As a temporary fix you can pin the scikit-learn version but it's not a good solution in the longterm.
Sorry I can't be more helpful
from spherecluster.
Related Issues (20)
- VMF scaling denominator was inf HOT 8
- black dependency breaks python3.5 install HOT 4
- AttributeError: 'SphericalKMeans' object has no attribute '_check_fit_data' HOT 4
- Source install fails due exceptions in setup.py
- Question about sample_vMF HOT 8
- Initialization is using euclidean distance HOT 3
- Using Spherical clustering for Mini-Batch K-Means HOT 1
- Spherical K-Means is producing different results each run even when fixing `random_state` at an integer HOT 1
- TypeError: Expected sequence or array-like, got <class 'NoneType'> HOT 5
- ImportError: cannot import name '_k_means' HOT 10
- Returned labels are floats in VonMissesFisherMixture (soft and hard)
- TypeError: _labels_inertia() got an unexpected keyword argument 'precompute_distances' HOT 2
- Mistake in sample_vMF HOT 1
- Error in _sample_orthonormal_to
- Cannot import spherecluster with scikit-learn 1.0.2: sklearn.cluster.k_means_ has been renamed HOT 3
- Using it for dataframe
- ValueError: Data l2-norm must be 1, found 0.0
- This repo is dead
- return value of movMF function includes None when n_jobs!=1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spherecluster.