Giter VIP home page Giter VIP logo

Comments (3)

hupili avatar hupili commented on June 10, 2024

Sounds like a case where:

  • Data points are too close to each other, relatively speaking, compared with the distance between centroid.
  • One centroid captures all the data points at a glance and updates itself to the centre of those points; while all other centroid has no data to update themselves.

Without looking at the exact data, you can try the following methods:

  1. Normalise all the records, in case the distance is too small in original space.
  2. Manually set K-means centroid initial values. If you intend to have K clusters, randomly pick K data points to be the initial centroids.

Which algorithm is better is hard to tell without looking at the data. We can focus on making K-means work first.

from python-for-data-and-media-communication-gitbook.

ivywze avatar ivywze commented on June 10, 2024

In sklearn.cluster.KMeans if set ( init=’random’), seems the centroid will be randomly picked. And if random to choose centroids and run for many times but obey the same result, I guess it rules out the possibility that the distance between data points is smaller than the distance between centroid, because it's already random.

Looks like there left only one situtation that there is no distance at all of are the data points.

from python-for-data-and-media-communication-gitbook.

ivywze avatar ivywze commented on June 10, 2024

If the dataset has infinite many data points, seems under some distance constrictions the data shape like Paraboloid may result in just only one non-empty cluster. But for the dataset with limited data points, it's unlikely to have the result.

from python-for-data-and-media-communication-gitbook.

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.