International Journal of Computer Applications
Foundation of Computer Science (FCS), NY, USA
|
Volume 186 - Issue 40 |
Published: September 2024 |
Authors: Ahmad Farhan Alshammari |
![]() |
Ahmad Farhan Alshammari . Implementation of Clustering using K-Means in Python. International Journal of Computer Applications. 186, 40 (September 2024), 12-17. DOI=10.5120/ijca2024923990
@article{ 10.5120/ijca2024923990, author = { Ahmad Farhan Alshammari }, title = { Implementation of Clustering using K-Means in Python }, journal = { International Journal of Computer Applications }, year = { 2024 }, volume = { 186 }, number = { 40 }, pages = { 12-17 }, doi = { 10.5120/ijca2024923990 }, publisher = { Foundation of Computer Science (FCS), NY, USA } }
%0 Journal Article %D 2024 %A Ahmad Farhan Alshammari %T Implementation of Clustering using K-Means in Python%T %J International Journal of Computer Applications %V 186 %N 40 %P 12-17 %R 10.5120/ijca2024923990 %I Foundation of Computer Science (FCS), NY, USA
The goal of this research is to develop a clustering program using k-means method in Python. Clustering helps to divide data into clusters (or groups) based on their features. K-means is used to assign the data points to the cluster of the closest center. Euclidean distance is used to measure the distances between the data points and the centers. K-means is an iterative method that continues in processing to update the centers until the final clusters are obtained. The basic steps of clustering using k-means are explained: preparing data, initializing centers, computing labels (computing distances, finding minimum distance, and assigning labels), computing clusters, computing error function, updating centers, and plotting clusters. The developed program was tested on an experimental dataset. The program successfully performed the basic steps of clustering using k-means and provided the required results.