The classification of dyslexia has become a significant challenge in the field of artificial intelligence, particularly when dealing with imbalanced datasets between dyslexic and non-dyslexic individuals. This study aims to compare the performance of two machine learning algorithms, namely K-Nearest Neighbors (KNN) and Random Forest (RF), in classifying dyslexia using the SMOTE-ENN (Synthetic Minority Oversampling Technique–Edited Nearest Neighbours) data balancing technique. The dataset was obtained from the Kaggle platform, consisting of 220 initial samples and 197 features. The preprocessing stages included data subsetting, label encoding, and feature normalization using MinMaxScaler, followed by an 80% training and 20% testing data split. The results show that the application of SMOTE-ENN successfully improved the class distribution balance and enhanced the performance of both models. The Random Forest algorithm achieved the best performance with an accuracy of 92.5%, recall of 94.0%, F1-score of 92.5%, and ROC-AUC of 0.97, while KNN achieved an accuracy of 87.5% with a ROC-AUC of 0.90. The improvement in recall and F1-score demonstrates the effectiveness of SMOTE-ENN in enhancing model performance for the minority class. Overall, this study proves that the combination of machine learning algorithms with data balancing techniques can improve classification accuracy and serve as a potential solution for early detection of dyslexia based on cognitive and digital behavioral data.
Copyrights © 2026