Skip to content

A simple Kmeans Cluster code using python that randomly initialize points and centroids, then cluster the points to the nearest centroids using the kmeans cluster algorithm .

Notifications You must be signed in to change notification settings

OmarRaed/kMeansClustering

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kmeans Cluster

A simple Kmeans Cluster code using python that randomly initialize points and centroids, then cluster the points to the nearest centroids using the kmeans cluster algorithm .

This code uses matplotlib library to plot the output of each iteration until the converge occured

Adjusting values

You can change the number of randomly generated points, centroids and the max-min x and y values by modifying the next line of codes

POINTS_NUM = 25
CENTROIDS_NUM = 4
X_MIN = 0
X_MAX = 50
Y_MIN = 0
Y_MAX = 50.

About

A simple Kmeans Cluster code using python that randomly initialize points and centroids, then cluster the points to the nearest centroids using the kmeans cluster algorithm .

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages