Application of KNN algorithm for predicting celiac disease using clinical and serological variables - Levano, Daniel (2025)
Celiac disease is an autoimmune condition with a global prevalence close to 1%, often underdiagnosed due to low clinical suspicion, which increases both morbidity and mortality. In this context, the application of the K-Nearest Neighbors (KNN) algorithm emerged as a predictive model to support the detection of this disease using clinical and serological variables. A supervised model was developed using the KNN algorithm and clinical and serological data extracted from an academic dataset containing 2,206 records. To address class imbalance, the Synthetic Minority Over-sampling Technique (SMOTE) was applied. The data were split for training and validation, optimizing the classification parameter through cross-validation. In addition, a web platform was developed to support data input, analysis, and output, allowing the uploading, processing, and generation of medical reports with role-based access and diagnostic probability estimation. The model achieved 94% accuracy, 97% precision, and 91% sensitivity. The algorithm proved to be effective for predicting celiac disease based on clinical and serological data, and its web-based implementation enables practical integration in clinical environments.