Coder Social home page Coder Social logo

surya-murali / clustering-using-kmeans Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 3.84 MB

This project uses K-means algorithm to partition a set of points into K clusters. The algorithm works iteratively to assign each data point to one of K groups based on the features provided.

Python 100.00%
kmeans clustering centroid segmentation algorithm

clustering-using-kmeans's Introduction

Clustering-Using-KMeans

K-means is an unsupervised clustering algorithm that tries to partition a set of points into k clusters. It is used when you have to group a collection of stuff into various clusters.

The Algorithm:

  • Assign random positions for k centroids
  • Compute the distance of each point from the centroids and assign each point to its nearest centroid, thereby forming k clusters
  • Take the mean of the distance of the points assigned to each centroid. This now becomes the positions of the new centroids
  • Now check the error(distance) between the positions of old and new centroids.
  • If the error is not equal to 0, repeat steps 3 and 4. If the positions of the old and new centroids match, then the required clusters are formed!

This gif might help you better understand the algorithm alt text

However, using Python's Scikit to perform KMeans is much simpler The outputs can be found here.

Some practical applications:

  • Pricing Segmentation
  • Customer Need Segmentation
  • Loyalty Segmentation
  • Where do millionaires live?
  • Create stereotypes from demographics data

clustering-using-kmeans's People

Contributors

surya-murali avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.