Coder Social home page Coder Social logo

AttributeError: 'KMeansConstrained' object has no attribute '_check_fit_data' getting while fitting the data about k-means-constrained HOT 5 CLOSED

joshlk avatar joshlk commented on July 20, 2024
AttributeError: 'KMeansConstrained' object has no attribute '_check_fit_data' getting while fitting the data

from k-means-constrained.

Comments (5)

joshlk avatar joshlk commented on July 20, 2024

from k-means-constrained.

adinarayanaPalvadi avatar adinarayanaPalvadi commented on July 20, 2024

scikit-learn version is 0.21.2 and
or tools version is 7.5.7466
The dummy code is as follows
X = df_size_7[['Latitude','Longitude']].head(5).values array([[14.6625047, 77.5828207], [14.6975793, 77.5834339], [14.6865696, 77.5916512], [14.6772115, 77.5933416], [14.6780301, 77.5935025]])

KMeansConstrained(n_clusters=5,size_min=2,size_max=1).fit(X)

AttributeError Traceback (most recent call last)
in
----> 1 KMeansConstrained(n_clusters=5,size_min=2,size_max=1).fit(X)

~\AppData\Local\Continuum\anaconda3.1\lib\site-packages\k_means_constrained-0.2.0-py3.7-win-amd64.egg\k_means_constrained\k_means_constrained_.py in fit(self, X, y)
621 """
622 random_state = check_random_state(self.random_state)
--> 623 X = self.check_fit_data(X)
624
625 self.cluster_centers
, self.labels_, self.inertia_, self.n_iter_ = \

AttributeError: 'KMeansConstrained' object has no attribute '_check_fit_data'

from k-means-constrained.

joshlk avatar joshlk commented on July 20, 2024

@adinarayanaPalvadi The problem should now be fixed with the latest version (v0.3.1). The easiest way to install is using PyPI:
pip install k-means-constrained

from k-means-constrained.

joshlk avatar joshlk commented on July 20, 2024

Let me know if you have any problems

from k-means-constrained.

joshlk avatar joshlk commented on July 20, 2024

Closing as no reply. Please comment again if you require further help.

from k-means-constrained.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.