Kupang City faces significant challenges in providing clean water due to its dry geographical conditions and extreme climate. Although it has various potential water sources such as watersheds and bore wells, clean water distribution remains suboptimal. This study aims to predict clean water quality using two machine learning algorithms, namely K-Nearest Neighbor (KNN) and Naïve Bayes, based on the Water Quality Dataset which includes parameters such as pH, hardness, total dissolved solids, and turbidity. The process involves data preprocessing, algorithm implementation, and model evaluation using classification metrics. The KNN model achieved an accuracy of 56%, with an F1-score of 0.67 for the “unsafe” class and 0.36 for the “safe” class. Meanwhile, the Naïve Bayes model achieved a higher overall accuracy of 61% but failed to detect the “safe” class, showing a precision and recall of 0.00. Overall, KNN performed more balanced across classes despite its moderate accuracy, while Naïve Bayes was biased toward the majority class. These findings highlight the importance of selecting appropriate algorithms and tuning parameters for water quality prediction. The implementation of predictive models is expected to assist PDAM Kupang in making data-driven decisions to improve clean water management sustainably.
Copyrights © 2026