Supervised learning is one of the fundamental parts of machine learning that studies the relationship between input feature variables and a target output variable. It is employed across various fields to enhance decision-making efficacy through algorithms that learn informative patterns from data. Among the numerous supervised learning methods, the k nearest neighbor (kNN) (Fix & Hodges, 1989) method is one of the most widely used (Singh, Thakur & Sharma, 2016; Ray, 2019; Sarker, 2021).