Skip to content

A python implementation of k-means clustering algorithm.

Notifications You must be signed in to change notification settings

zzzzzz0407/K-means

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

K-means

A python implementation of k-means clustering algorithm.

Input

  1. A list of points in the plane where each point is represented by a latitude/longitude pair.
  2. The number of centroids
  3. The max_number of iterations
  4. The condition of convergence

Output

  • The final clusters of points.
  • An image to make the result clear.
  • Optional, the loss or clusters of points after each iteration

Technical details

The distance of two points in the code use the euclidean metric, you can also use other method as you like. You may have to modify the get_data code that data format in file may different, or you can modify the format of points just like me.

About

A python implementation of k-means clustering algorithm.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages