Ranah Research : Journal of Multidisciplinary Research and Development · e-ISSN: 2655-0865

Implementation of the K-Means Algorithm to Cluster Levels of Violations by Islamic Boarding School Students in the Area of Ubudiyah

Siti Hotija Imam Wahyudi
Vol. 8 No. 6 (2026) 14 October 2026 Pages 2544-2553

Abstract

Violations in the field of ubudiyah committed by students can affect the discipline building process within the Islamic boarding school environment. The large amount of stored violation data has not been optimally utilized to identify patterns of violations, so the discipline building process is still carried out in a general manner. This study aims to implement the K-Means algorithm to cluster the severity of religious discipline violations committed by students at the Annuqayah Lubangsa Putri Islamic Boarding School. The research method used is Knowledge Discovery in Databases (KDD), which includes data cleaning, data transformation, normalization using the Min-Max method, determining the number of clusters using the Elbow method, the clustering process using the K-Means algorithm, and evaluation using the Silhouette Score. The dataset consists of 1,022 student records with 58 variables related to religious discipline violations. The results indicate that the optimal number of clusters is three (K=3). The clustering results yielded Cluster 0 with 983 students (96.18%), Cluster 1 with 14 students (1.37%), and Cluster 2 with 25 students (2.45%). The evaluation using the Silhouette Score yielded a value of 0.6491, indicating that the quality of the clustering falls into the good category. These findings demonstrate that the K-Means algorithm is capable of clustering data on student violations based on the similarity of characteristics, thereby providing a foundation for school administrators to develop more effective, objective, and data driven guidance strategies.

Keywords

K-Means Data Mining Clustering Elbow Method Student Misconduct