Naïve Bayes and K-Nearest Neighbor Algorithms Performance Comparison in Diabetes Mellitus Early Diagnosis

Diabetes Mellitus (DM) is a chronic disease that occurs when the body cannot effectively use the insulin it produces. The use of artificial intelligence (AI) can provide a means to diagnose. This study aims to obtain the best classification of the Naïve Bayes (NB) and K-Nearest Neighbors (KNN) methods so that accurate results are obtained in diagnosing DM disease using a dataset originating from The Abdul Moeis Hospital, Samarinda, East Kalimantan, Indonesia. The results showed that the KNN performed better in accuracy, precision, and specificity with an Area Under the Curve (AUC) value 10% higher than NB. Overall, KNN obtained a better recall compared to the NB in order to DM diagnosis.