Optimizing k-means centroid initialization using genetic algorithms for student activity clustering

International Journal of Artificial Intelligence

Optimizing k-means centroid initialization using genetic algorithms for student activity clustering

Abstract

K-means is one of the most widely used clustering algorithms due to its computational efficiency and simplicity. However, its performance depends heavily on the selection of initial centroids, which can lead to inconsistent or suboptimal outcomes. To address this limitation, k-means++ was introduced with a probabilistic initialization strategy. Although it improves stability compared to random initialization, k-means++ still encounters challenges when applied to datasets with complex or non-linear structures. This study proposes integrating a genetic algorithm (GA) with k-means to optimize centroid initialization before clustering. GA applies selection, crossover, and mutation processes to explore the solution space and identify near-optimal centroids. The performance of GA k-means was evaluated using fitness scores and silhouette scores, and compared with k-means++ and random initialization. Experiments were conducted on student online learning activity data, including module access, discussion participation, and other interactions. Results show that GA consistently produces higher fitness values, with the best score of 0.8948 at two clusters, reflecting stable centroid optimization. Meanwhile, k-means++ achieved the highest silhouette score of 0.6144 at three clusters, indicating the most coherent structure. These results demonstrate that combining GA with k-means offers a robust solution for clustering educational data and similar applications.

Discover Our Library

Embark on a journey through our expansive collection of articles and let curiosity lead your path to innovation.

Explore Now
Library 3D Ilustration