IMPLEMENTATION OF K NEAREST NEIGHBORS WITH CROSS VALIDATION AND EUCLIDEAN DISTANCE FOR ELECTRICITY MISUSE PREDICTION AT PLN UP3 DEMAK - Retno Supiyanti; Efa Yumna Purwono (Khamdan Karya Cipta, 2025)
Electricity misuse is a critical issue that severely impacts both operational efficiency and revenue within utility companies, particularly in developing regions. This study presents the implementation of the K Nearest Neighbors (K NN) algorithm with cross validation and Euclidean distance metrics to predict electricity misuse in the PLN UP3 Demak area. The analysis focuses on the P2 and P3 customer segments, known for their diverse consumption patterns and higher risk of fraudulent activities. Given the inherent class imbalance in the dataset here instances of misuse are significantly outnumbered by legitimate consumption he Synthetic Minority Over sampling Technique (SMOTE) was applied to improve the model’s ability to detect minority class instances. Our findings reveal that applying SMOTE resulted in a substantial increase in the model’s accuracy, precision, and recall, demonstrating its effectiveness in balancing the dataset. Specifically, the application of K NN with SMOTE showed improved detection of irregular consumption patterns indicative of electricity misuse, which were less discernible in the original imbalanced dataset. The comparative analysis between models trained with and without SMOTE underscored the importance of addressing class imbalance to achieve reliable predictive performance. Furthermore, the study identified distinct behavioral patterns in P2 and P3 customers, which are critical for early detection of potential misuse. These findings were supported by the cross validation results, which confirmed the model's robustness and its capability to generalize well to unseen data. Overall, this research provides valuable insights for utility companies, highlighting the importance of implementing advanced machine learning techniques like K NN with SMOTE to enhance fraud detection capabilities. The study also emphasizes the necessity of continuous monitoring and analysis of customer consumption patterns to proactively identify and mitigate potential misuse