Classification of weather events in Lahat regency using the K-Nearest Neighbor method
DOI:
https://doi.org/10.12928/bamme.v5i2.14613Keywords:
Euclidean , KNN, Manhattan, Minkowski, Weather eventsAbstract
Weather event classification in a region is very important for various purposes, such as in the fields of transportation, health, agriculture, and others. Lahat has varying land elevations ranging from 26-106 meters above sea level in the East Merapi sub-district to 341-3032 meters above sea level in the Tanjung Sakti Pumi sub-district. It greatly affects local temperature, rainfall, and atmospheric pressure, which in turn affects the distribution of weather patterns and disasters such as floods. KNN is a prediction method that uses the concept of distance for a number of k nearest observations in determining the similarity between observations. Several metrics can be used for this prediction purpose. This study aims to predict weather events in Lahat Regency using the KNN method with several different distance metrics and then compare them to obtain the performance of the KNN prediction method. The results show that the Euclidean distance metric used in the KNN method has a better performance measurement, followed by the Manhattan and Minkowski metrics. In the Euclidean metric, the accuracy, precision, recall, f1-score, AUC, and MC value are 92.69%, 88.21%, 85.81%, 86.99%, 88.99%, and 76.37%, respectively.
References
Ali, N., Neagu, D., & Trundle, P. (2019). Evaluation of k‑nearest neighbor classifier performance for heterogeneous data sets. SN Applied Sciences 1:1559, https://doi.org/10.1007/s42452-019-1356-9
Nayak, S., Bhat, M., Reddy, N.V.S., & Rao, B.A. (2022). Study of distance metrics on k - nearest neighbor algorithm for star categorization. Journal of Physics: Conference Series. 2161s 012004 IOP Publishing doi:10.1088/1742-6596/2161/1/012004
Qu, H., Xu, J., Li, Z., Wei, D., & Wang, F. (2023). Effects of embedded distance measurements interacting with modeling approaches on empirical dynamical model predictions. Ecological Indicators 146 (2023) 109895.
Nair, V.G. (2025). Metric-Driven Voronoi Diagrams: A Comprehensive Mathematical Framework. Computation, 13, 212. https://doi.org/10.3390/computation13090212.
Halder, R. K., Uddin, M. N., Uddin, M. A., Aryal, S., & Khraisat, A. (2024). Enhancing K-nearest neighbor algorithm: a comprehensive review and performance analysis of modifcation
Journal of Big Data 11:113.
Cetin, A. I. & Buyuklu, A.H. (2025). A new approach to K-nearest neighbors distance metrics on sovereign country credit rating country credit rating. Kuwait Journal of Science 52 (2025) 100324.
Cubillos, M., Wohlk, S., & Wulff, J. N. (2022). A bi-objective k-nearest-neighbors-based imputation method for multilevel data. Expert Systems with Applications 204 (2022) 117298.
BPS-Statistics Lahat Regency. (2025). Lahat Regency in Figures 7 (45), Catalogue: 1102001.1604, ISSN 0215-3971.
Chandra, W., Suprihatin, B., & Resti, Y. (2023). Median-KNN Regressor-SMOTE-Tomek Links for Handling Missing and Imbalanced Data in Air Quality Prediction. Symmetry, 15, 887. https://doi.org/10.3390/sym150408
Resti, Y., Irsan, C., Amini, M., Yani, I., Passarella, R., & Zayanti, D.A. (2022). Performance Improvement of Decision Tree Model using Fuzzy Membership Function for Classification of Corn Plant Diseases and Pests. Science and Technology Indonesia, e-ISSN:2580-4391 p-ISSN:2580-4405 Vol. 7, No. 3, July.
Yani, I., Marwani, Puspitasari, D., & Resti, Y. (2025). The Symmetric Pattern Fuzzy Discretization in Predicting Plastic Type for a Sorting System Using Decision Tree Methods. Science and Technology Indonesia, e-ISSN:2580-4391 p-ISSN:2580-4405, Vol. 10, No. 3, July.
Resti, Y., Yani, I., Puspitasari, D., Thamrin, I., & Saputra, M.A.A. (2025). Ensemble Method of Multiple Decision Trees with Crisp and Fuzzy Discretization for Axial Surface Roughness Prediction. Science and Technology Indonesia e-ISSN:2580-4391 p-ISSN:2580-4405 Vol. 10, No. 3, July.
Kresnawati, S.K., Suprihatin, B., & Resti, Y. (2024). The Combinations of Fuzzy Membership Functions on Discretization in the Decision Tree-ID3 to Predict Degenerative Disease Status. Symmetry 2024, 16, 1560. https://doi.org/10.3390/sym16121560.
Chicco, D. & Jurman, G. (2023). A statistical comparison between Matthew’s correlation coefficient (MCC), prevalence threshold, and Fowlkes–Mallow’s index. Journal of Biomedical Informatics 144 104426.
Arora, I., Khanduja, N., & Bansal, M. (2021). Effect of Distance Metric and Feature Scaling on KNN Algorithm while Classifying X-rays. The 10th Seminary of Computer Science Research at Feminine, March 08h, 2021, Constantine 2-Abdelhamid Mehri University, Algeria.
Debbek, F.Y., Ehtiba, F.O., & Abdelmula, H.S.B. (2024). Movie Recommendation Engine Based on Cosine Similarity and KNN. Special Issue for IJEIT on Engineering And Information Technology. , Vol.12 ,No. 1, December.
Lu, B., Charlton, M., Brunsdon, C., & Harris, P. (2015). A The Minkowski approach for choosing the distance metric in geographically weighted regression. International journal of geographical information science. Available from: http://dx.doi.org/10.1080/13658816.2015.1087001
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Endang Sri Kresnawati, Yulia Resti, Ning Eliyati, Des Alwine Zayanti, Novi Rustiana Dewi, Irsyadi Yani

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).

