Application of the K-Means Clustering Algorithm to Categorize Pregnant Women's Knowledge and Attitudes Towards Smoking During Pregnancy - Affandi, Egi; Harahap, Baginda; Harahap, Solianna (Journal of Technology and Computer, 2026)
Smoking and secondhand smoke exposure during pregnancy remain a significant maternal and child health risk, yet conventional descriptive analysis tends to treat knowledge and attitude scores separately, making it difficult to identify combined risk profiles for targeted health education. This study applies K-Means Clustering, a data mining technique from computer science, to group pregnant women based on the combination of their knowledge and attitude scores toward smoking during pregnancy. Data were collected from 30 respondents through a questionnaire covering 10 knowledge items and 10 Likert-scale attitude items. The knowledge and attitude percentage scores were standardized (Z-score) and used as clustering features. The optimal number of clusters was determined using the Elbow Method and Silhouette Score, both of which pointed to k = 3 as the most interpretable solution, yielding a final Silhouette Score of 0.687. The resulting clusters were labeled Good (mean knowledge 86.0%, mean attitude 86.5%), Moderate (65.0%, 66.0%), and Poor (43.0%, 41.2%), each containing 10 respondents. The Poor cluster was dominated by housewives with the highest average parity, indicating a priority target group for smoking-related health education programs. These findings demonstrate that K-Means Clustering can serve as a practical decision-support tool for prioritizing maternal health interventions based on combined knowledge-attitude profiles, complementing conventional descriptive statistics commonly used in public health research.