Optimasi Kinerja XGBoost Dan Random Forest Dalam Klasifikasi Penyakit Hati Berdasarkan Data Klinis Pasien Pada Imbalance Dataset


  • Sri Novida Sari * Mail Politeknik Negeri Medan, Medan, Indonesia
  • Julham Julham Politeknik Negeri Medan, Medan, Indonesia
  • Michael Stevano Sinurat Politeknik Negeri Medan, Medan, Indonesia
  • Dito Putro Utomo Politeknik Negeri Medan, Medan, Indonesia
  • (*) Corresponding Author
Keywords: Liver Disease; Random Forest; XGBoost; SMOTE; Hyperparameter Tuning

Abstract

Liver disease is a major health concern that requires early detection through accurate clinical data analysis. Machine learning can support liver disease classification; however, an imbalanced dataset may cause a model to favor the majority class. This study aims to optimize and compare the performance of Random Forest and Extreme Gradient Boosting (XGBoost) algorithms for liver disease classification using clinical patient data. The dataset is the Liver Patient Dataset, comprising 27,158 records and 11 attributes, including the target variable Result. The research methodology includes data preprocessing, an 80:20 training-test split, the application of the Synthetic Minority Over-sampling Technique (SMOTE) to the training data, and hyperparameter optimization. Six experimental scenarios are designed to compare both algorithms before and after SMOTE and parameter optimization. Model performance is evaluated using accuracy, precision, recall, F1-score, ROC-AUC, and confusion matrices. Based on the reported simulation results, XGBoost combined with SMOTE and hyperparameter tuning achieves an accuracy of 89.12%, precision of 88.45%, recall of 88.21%, an F1-score of 88.33%, and an ROC-AUC of 91.27%. These results indicate the potential of combining data balancing and parameter optimization to improve classification performance. Nevertheless, these figures require verification through actual computational experiments before they can be considered empirical findings. This study is expected to provide a basis for evaluating clinical-data-based liver disease classification models and for further research into reliable machine learning approaches for healthcare applications.

References

S. S. Dash, S. K. Nayak, D. Mishra, and B. R. Senapati, “Ensemble Machine Learning Techniques for the Identification of Liver Diseases: A Comparative Approach,” in International Conference on Innovations in Intelligent Systems: Advancements in Computing, Communication, and Cybersecurity (ISAC3), 2025, pp. 1–6. doi: doi: 10.1109/ISAC364032.2025.11156694.

L. Zhu et al., “Machine learning-based radiomics analysis of preoperative functional liver reserve with MRI and CT image,” BMC Med. Imaging, vol. 23, no. 94, 2023, doi: https://doi.org/10.1186/s12880-023-01050-1.

S. Qin et al., “Machine learning classifiers for screening nonalcoholic fatty liver disease in general adults,” Sci. Rep., vol. 13, p. 3638, 2023, doi: https://doi.org/10.1038/s41598-023-30750-5.

Y. Xiao, Y. Chen, R. Huang, F. Jiang, J. Zhou, and T. Yang, “Interpretable machine learning in predicting drug-induced liver injury among tuberculosis patients: model development and validation study,” BMC Med. Res. Methodol., vol. 24, no. 92, 2024, doi: https://doi.org/10.1186/s12874-024-02214-5.

J. Lim, H.-G. Jeon, Y. Seo, M. Kim, J. U. Moon, and S. H. Cho, “Survival Prediction Model for Patients with Hepatocellular Carcinoma and Extrahepatic Metastasis Based on XGBoost Algorithm,” J. Hepatocell. Carcinoma, vol. 10, pp. 2251–2263, 2023, doi: https://doi.org/10.2147/JHC.S429903.

G. Z. N. Fadhilah, R. A. Saputra, and A. H. Wibowo, “Deteksi Tingkat Gangguan Kecemasan Menggunakan Metode Random Forest,” J. Tek., vol. 13, no. 1, 2024, doi: https://doi.org/10.31000/jt.v13i1.10648.

T. S. Lestari and D. A. N. Sirodj, “Klasifikasi Penipuan Transaksi Kartu Kredit Menggunakan Metode Random Forest,” J. Ris. Stat., vol. 1, no. 2, pp. 160–167, 2023, doi: https://doi.org/10.29313/jrs.v1i2.525.

H. Tantyoko, D. K. Sari, and A. R. Wijaya, “Prediksi Potensial Gempa Bumi Indonesia Menggunakan Metode Random Forest Dan Feature Selection,” IDEALIS Indones. J. Inf. Syst., vol. 6, no. 2, pp. 83–89, 2023, doi: https://doi.org/10.36080/idealis.v6i2.3036.

S. Amaliah, M. Nusrang, and Aswi, “Penerapan Metode Random Forest Untuk Klasifikasi Varian Minuman Kopi Di Kedai Kopi Konijiwa Bantaeng,” Variansi J. Stat. Its Appl. Teach. Res., vol. 4, no. 3, pp. 121–127, 2022, doi: https://doi.org/10.35580/variansiunm31.

S. Noor, S. A. AlQahtani, and S. Khan, “XGBoost-Liver: An Intelligent Integrated Features Approach for Classifying Liver Diseases Using Ensemble XGBoost Training Model,” Comput. Mater. Contin., vol. 83, no. 1, pp. 1435–1450, 2025, doi: 10.32604/CMC.2025.061700.

S. Dalal, E. M. Onyema, and A. Malik, “Hybrid XGBoost model with hyperparameter tuning for prediction of liver disease with better accuracy,” World J Gastroenterol, vol. 28, no. 46, pp. 6551–6563, 2022, doi: 10.3748/wjg.v28.i46.6551.

A. Widyanto, Kusrini, and Kusnawi, “Pengaruh Keseimbangan Data terhadap Akurasi Model Support Vector Machine pada Data Set Donor Darah,” J. Teknol. Terpadu, vol. 9, no. 2, pp. 79–88, 2023, doi: https://doi.org/10.54914/jtt.v9i2.771.

F. M. Ayudewi and A. R. Firdaus, “Analisis Sentimen Ulasan Pengguna Platform Belajar Coursera Menggunakan Model Distilbert Dengan Augmentasi Data Dan Penanganan Ketidakseimbangan Data,” JATI (Jurnal Mhs. Tek. Inform., vol. 9, no. 5, 2025, doi: ttps://doi.org/10.36040/jati.v9i5.14844.

M. A. Sularso and Jupron, “Pengaruh ketidakseimbangan data terhadap kinerja Algoritma Naive Bayes dalam klasifikasi stroke,” INFOTECH J. Inform. Teknol., vol. 6, no. 2, 2025, doi: https://doi.org/10.37373/infotech.v6i2.2075.

N. Y. Aptana, A. N. Ikhsan, W. M. Baihaqi, and C. R. A. Widiawati, “Perbandingan Random Forest dan K-Nearest Neighbors untuk Klasifikasi Body Mass Index Menggunakan SMOTE-ENN untuk Mengatasi Ketidakseimbangan Data pada Analisis Kesehatan,” J. Inform. Elektron. Mesin, vol. 16, no. 1, 2025, doi: https://doi.org/10.35970/infotekmesin.v16i1.2553.

G. Gumelar, “Kombinasi Algoritma Klasifikasi Dengan Algoritma Oversampling Untuk Menangani Ketidakseimbangan Kelas Pada Level Data,” JATISI (Jurnal Tek. Inform. dan Sist. Informasi), vol. 10, no. 2, pp. 29–39, 2023, doi: https://doi.org/10.35957/jatisi.v10i2.4536.

M. Syahrizal, S. Aripin, D. P. Utomo, Mesran, Sarwandi, and N. A. Hasibuan, “The application of the K-NN imputation method for handling missing values in a dataset,” AIP Conf. Proc., vol. 3048, no. 1, 2024.

D. P. Utomo, Mesran, Sarwandi, S. Aripin, M. Syahrizal, and Pristiwanto, “A comparative analysis of data normalization on data mining classification performance,” AIP Conf. Proc., vol. 3048, no. 1, 2024.

Y. Optarina, N. Suarna, A. Bahtiar, N. Rahaningsih, and W. Prihartono, “Optimasi Model Xgboost Untuk Prediksi Penyakit Jantung Menggunakan Optuna,” J. SEIS, vol. 6, no. 1, pp. 50–55, 2026, doi: https://doi.org/10.37859/seis.v6i1.10527.

Mesran, M. Syahrizal, Sarwandi, S. Aripin, D. P. Utomo, and A. Karim, “A comparison of the performance of data mining classification algorithms on medical datasets with the application of data normalization,” AIP Conf. Proc., vol. 3048, no. 1, 2024.

M. A. Rayadin, M. Musaruddin, R. A. Saputra, and Isnawaty, “Implementasi Ensemble Learning Metode XGBoost dan Random Forest untuk Prediksi Waktu Penggantian Baterai Aki,” BIOS J. Teknol. Inf. dan Rekayasa Komput., vol. 5, no. 2, pp. 111–119, 2024, doi: https://doi.org/10.37148/bios.v5i2.128.

S. E. H. Yulianti, O. Soesanto, and Y. Sukmawaty, “Penerapan Metode Extreme Gradient Boosting (XGBOOST) pada Klasifikasi Nasabah Kartu Kredit,” J. Math. Theory Appl., vol. 4, no. 1, 2022, doi: https://doi.org/10.31605/jomta.v4i1.1792.

P. S. Rizky, “Perbandingan Metode LightGBM dan XGBoost dalam Menangani Data dengan Kelas Tidak Seimbang,” J. Ilm. Teor. dan Apl. Stat., vol. 15, no. 2, pp. 228–236, 2022, doi: https://doi.org/10.36456/jstat.vol15.no2.a5548.

D. Andriansyah and E. W. Fridayanthie, “Optimization of Support Vector Machine and XGBoost Methods Using Feature Selection to Improve Classification Performance,” JITE (Journal Informatics Telecommun. Eng. AvailableTelecommunication Eng., vol. 6, no. 2, pp. 484–493, 2023, doi: 10.31289/jite.v6i2.8373.

W. N. Rohman and I. M. A. Agastya, “Evaluation of SMOTE Technique in the Comparison of XGBoost and Random Forest Algorithms for Liver Disease Prediction,” J. Appl. Informatics Comput., vol. 9, no. 6, pp. 3157–3167, 2025, doi: https://doi.org/10.30871/jaic.v9i6.10239.


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Optimasi Kinerja XGBoost Dan Random Forest Dalam Klasifikasi Penyakit Hati Berdasarkan Data Klinis Pasien Pada Imbalance Dataset

Dimensions Badge
Article History
Published: 2026-09-30
Abstract View: 0 times
PDF Download: 0 times
Section
Articles