This study aims to identify transaction activities that lead to online gambling practices in rural communities using the K-Nearest Neighbor (KNN) algorithm. The data used consists of digital transaction records from the residents of Ciheulang Tonggoh Village, with attributes such as transaction amount, payment method, number of transactions, and total spending. The research process includes data collection, preprocessing, model training, and evaluation using standard classification metrics.The developed KNN model achieved an accuracy of 80% in classifying transactions into “Normal” and “Addiction” categories. Exploratory data analysis also revealed that the majority of transactions fall into the addiction category, characterized by repetitive amounts and high frequency. This model is expected to serve as an early detection system to assist village authorities or social institutions in preventing and monitoring online gambling activities based on data patterns. This research demonstrates the potential of applying machine learning as a technological solution to address social issues in the digital era.
Copyrights © 2025