Journal of Computer Science and Informatics Engineering
Vol 5 No 4 (2026)

Analysis of Hyperparameter Effects on Random Forest Performance in Diabetes Classification

Haris Pratama (Universitas Islam Negeri Sumatera Utara)
Muhammad Siddik Hasibuan (Universitas Islam Negeri Sumatera Utara)
Ahmad Taufik Al Afkari Siahaan (Universitas Islam Negeri Sumatera Utara)



Article Info

Publish Date
24 Nov 2026

Abstract

 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






Journal Info

Abbrev

cosie

Publisher

Subject

Computer Science & IT

Description

Artificial Intelligence Machine Learning Natural Language Processing Computer Vision Text Speech Text Mining Data mining Cryptography Data visualization Expert System Deep Learning Fuzzy Logic IoT and smart environments Neural Networks Pattern Recognition Image Processing Optimization Digital Signal ...