This study aimed to examine the effects of three selected hyperparameters on the performance of the Random Forest algorithm in multiclass diabetes classification using the AravindPCoder Diabetes Dataset obtained from Kaggle. The dataset comprised 1,000 patient records with 13 input features and three target classes: Non-Diabetes, Pre-Diabetes, and Diabetes. Following data cleaning and categorical encoding, model performance was evaluated using two training–testing split configurations: 80:20 and 70:30. The hyperparameters investigated were n_estimators, max_depth, and min_samples_split. Model performance was assessed using accuracy, macro-averaged precision, macro-averaged recall, and macro-averaged F1- score. The results showed that the highest observed accuracy was 99.50% under the 80:20 split, with the default Random Forest model achieving 99.80% precision, 96.67% recall, and a 98.15% F1-score. Hyperparameter tuning did not improve accuracy under this configuration. In contrast, under the 70:30 split, hyperparameter tuning increased accuracy from 98.67% to 99.33% and recall from 93.68% to 95.83%, with the selected configuration of n_estimators = 200, max_depth = 10, and min_samples_split = 5. These findings indicate that the observed effects of hyperparameter tuning differed between the two training–testing split configurations. However, the results are limited to the dataset and experimental configurations examined in this study. Further evaluation using independent datasets and external validation is necessary to assess the model's generalizability to other patient populations.
Copyrights © 2026