A Machine Learning Approach to Customers Segmentation Using the K-Nearest Neighbors (knn) Algorithm: an Evaluation of Accuracy and Performance
Student: Isma'il Anchau Suleiman (Project, 2025)
Department of Computer Science and Information Technology
Federal University, Dutsin-Ma, Katsina State
Abstract
In today’s data-driven economy, understanding customer behavior through effective segmentation has become a strategic priority for businesses. This study investigates the application of the KNearest (KNN) algorithm in customer segmentation and evaluates its performance in terms of accuracy and computational efficiency. KNN, a simple yet powerful supervised learning algorithm, is explored for its capacity to group customers based on behavioral and demographic data. The dataset used includes customer attributes such as age, income, spending score and gender, which were preprocessed and standardized prior to modeling. The KNN model was trained and tested using various distance metrics and values of ‘k’ to determine optimal clustering performance. Evaluation metrics such as accuracy, precision, recall, F1-score and computational cost were employed to assess the model. The results indicate that KNN performs reasonable well in segmenting customers, particularly when an optimal ‘k’ value is chosen and data is well-scaled. The study also compares KNN’s performance with other clustering and classification algorithm to provide a broader context for its practical use in marketing analytics.
Keywords
For the full publication, please contact the author directly at: isanchau01@gmail.com
Filters
Institutions
- Adeseun Ogundoyin Polytechnic, Eruwa, Oyo State 1
- Adeyemi College of Education, Ondo State. (affl To Oau, Ile-Ife) 68
- Ahmadu Bello University, Zaria, Kaduna State 101
- Air Force Institute of Technology (Degree), Kaduna, Kaduna State 11
- Air Force Institute of Technology, Kaduna, Kaduna State 2
- Akanu Ibiam Federal Polytechnic, Unwana, Afikpo, Ebonyi State 6
- Akwa Ibom State University, Ikot-Akpaden, Akwa Ibom State 53
- Akwa Ibom State College of Edu, Afaha-Nsit (Affl To Uni Uyo), Akwa Ibom State 2
- AKWA-IBOM STATE POLYTECHNIC (IEI), IKOT-OSURUA, AKWA IBOM STATE 41
- Akwa-Ibom State Polytechnic, Ikot-Osurua, Akwa Ibom State 32