Optimasi Kinerja XGBoost dan Random Forest melalui Seleksi Fitur dalam Klasifikasi Penyakit Hati Berdasarkan Data Klinis Pasien
Abstract
Liver disease classification based on clinical data is a potential application of machine learning for identifying disease patterns through the analysis of patients’ biochemical parameters. This study aims to evaluate the effect of Chi-Square feature selection on the performance of Random Forest and Extreme Gradient Boosting (XGBoost) algorithms for liver disease classification. The dataset consists of 27,158 records containing demographic and clinical attributes, with Result as the target variable. The research process includes data preprocessing, stratified training and testing data splitting at an 80:20 ratio, selection of five features using Chi-Square, model development, and performance evaluation. Four experimental scenarios were conducted: Random Forest and XGBoost using all features and using Chi-Square-selected features. Performance was evaluated using accuracy, precision, recall, F1-score, ROC-AUC, and confusion matrices without applying SMOTE. The results show that XGBoost with Chi-Square feature selection achieved the highest accuracy of 85.97% and a precision of 88.66%. Meanwhile, Random Forest using all features achieved a recall of 89.78%, an F1-score of 84.20%, and a ROC-AUC of 98.90%. Chi-Square feature selection reduced the number of features from 11 to 5, although its effect differed between the two algorithms. These findings indicate that the effectiveness of feature selection depends on the algorithm and evaluation metrics used. This study provides a comparative assessment of Chi-Square feature selection for liver disease classification using clinical data.
References
[2] E. H. Houssein, N. Abdalkarim, N. A. Samee, M. Alabdulhafith, and E. Mohamed, “Improved Kepler Optimization Algorithm for Enhanced Feature Selection in Liver Disease Classification,” Knowledge-Based Syst., vol. 297, 2024, doi: 10.1016/j.knosys.2024.111960.
[3] W. El Atifi, O. El Rhazouani, F. M. Khan, and H. Sekkat, “Optimizing ensemble machine learning models for accurate liver disease prediction in healthcare,” PLoS One, vol. 20, no. 8, 2025, doi: 10.1371/journal.pone.0330899.
[4] S. M. Ganie, P. K. D. Pramanik, and Z. Zhao, “Improved liver disease prediction from clinical data through an evaluation of ensemble learning approaches,” BMC Med. Inform. Decis. Mak., vol. 14, no. 160, pp. 1–15, 2024, doi: https://doi.org/10.1186/s12911-024-02550-y.
[5] P. Singh, A. K. Yadav, and S. Gangwar, “Forecasting Liver Disorders with Machine Learning Models,” Int. J. Recent Innov. Trends Comput. Commun., vol. 11, no. 9, pp. 237–243, 2023, doi: 10.17762/ijritcc.v11i9.8339.
[6] A. Ganji, D. Usha, and P. S. Rajakumar, “Enhanced Early Diagnosis of Liver Diseases Using Feature Selection and Machine Learning Techniques on the Indian Liver Patient Dataset,” Scalable Comput. Pract. Exp., vol. 26, no. 3, 2025, doi: 10.12694/scpe.v26i3.4254.
[7] S. Gündoğdu, “Efficient Prediction of Early-Stage Diabetes Using XGBoost Classifier with Random Forest Feature Selection Technique,” Multimed. Tools Appl., 2023, doi: 10.1007/s11042-023-15165-8.
[8] A. E. Korial, I. I. Gorial, and A. J. Humaidi, “An Improved Ensemble-Based Cardiovascular Disease Detection System with Chi-Square Feature Selection,” Computers, vol. 13, no. 6, 2024, doi: 10.3390/computers13060126.
[9] K. Aprianto and M. D. Anasanti, “Classifying Heart Disease through Fusion of Multi-Source Datasets: Integration of Feature Selection and Explainable Machine Learning Techniques,” Indones. J. Comput. Cybern. Syst., vol. 19, no. 3, 2025, doi: 10.22146/ijccs.92395.
[10] A. Q. Md, S. Kulkarni, C. J. Joshua, T. Vaichole, S. Mohan, and C. Iwendi, “Enhanced Preprocessing Approach Using Ensemble Machine Learning Algorithms for Detecting Liver Disease,” Biomedicines, vol. 11, no. 2, p. 581, 2023, doi: 10.3390/biomedicines11020581.
[11] A. U. Rehman et al., “A Machine Learning-Based Framework for Accurate and Early Diagnosis of Liver Diseases: A Comprehensive Study on Feature Selection, Data Imbalance, and Algorithmic Performance,” Int. J. Intell. Syst., vol. 2024, no. 1, p. 6111312, 2024, doi: 10.1155/2024/6111312.
[12] A. R. Naderi Yaghouti, H. Zamanian, and A. Shalbaf, “Machine Learning Approaches for Early Detection of Non-alcoholic Steatohepatitis Based on Clinical and Blood Parameters,” Sci. Rep., vol. 14, p. 2442, 2024, doi: 10.1038/s41598-024-51741-0.
[13] A. Z. Al Wafi, F. P. Rochim, and V. Bezaleel, “Investigating Liver Disease Machine Learning Prediction Performance through Various Feature Selection Methods,” Matrik J. Manajemen, Tek. Inform. dan Rekayasa Komput., vol. 24, no. 3, pp. 505–518, 2025, doi: 10.30812/matrik.v24i3.4531.
[14] M. A. Al Ghifari, I. Budiman, T. H. Saragih, M. I. Mazdadi, R. Herteno, and H. A. A. Rozaq, “Implementation of Extra Trees Classifier and Chi-Square Feature Selection for Early Detection of Liver Disease,” J. Tek. Inform., vol. 6, no. 5, pp. 3925–3937, 2025, doi: 10.52436/1.jutif.2025.6.5.4261.
[15] O. Eray, “Liver Disease Prediction Using Hybrid Feature Selection: A Comparative Analysis of Machine Learning Models,” Appl. Sci., vol. 16, no. 13, p. 6726, 2026, doi: 10.3390/app16136726.
[16] D. Kurniawan, E. Budiman, M. Fadli, and E. R. Susanto, “A Improving Lung Cancer Classification with Feature Selection: A Comparative Study of Random Forest and XGBoost,” J. Mantik, vol. 9, no. 1, pp. 68–79, 2025, doi: 10.35335/mantik.v8i5.6319.
[17] R. A. Arifa, N. Suarna, A. Bahtiar, N. Rahaningsih, and W. Prihartono, “Model Machine Learning untuk Prediksi Risiko Penyakit Liver dengan Random Forest Teroptimasi,” J. Sist. Inf. dan Teknol., vol. 6, no. 1, 2026, doi: 10.56995/sintek.v6i1.204.
[18] A. Pratama, S. Assegaff, J. Jasmir, and N. Nurhadi, “Optimizing Heart Disease Classification Using C4.5, Random Forest, and XGBoost with ANOVA, Chi-Square, and AdaBoost,” J. Tek. Inform., 2026, doi: 10.52436/1.jutif.2026.7.2.5430.
[19] R. Amin, R. Yasmin, S. Ruhi, M. H. Rahman, and M. S. Reza, “Prediction of chronic liver disease patients using integrated projection based statistical feature extraction with machine learning algorithms,” Informatics Med. Unlocked, vol. 36, p. 101155, 2023, doi: 10.1016/j.imu.2022.101155.
[20] T. A. Assegie, R. Subhashni, N. K. Kumar, J. P. Manivannan, P. Duraisamy, and M. F. Engidaye, “Random Forest and Support Vector Machine-Based Hybrid Liver Disease Detection,” Bull. Electr. Eng. Informatics, vol. 11, no. 3, pp. 1650–1656, 2022, doi: 10.11591/eei.v11i3.3787.
[21] K. W. Kayohana, “KLASIFIKASI PENYAKIT HATI MENGGUNAKAN RANDOM FOREST DAN KNN,” JATI (Jurnal Mhs. Tek. Inform., vol. 8, no. 4, pp. 7924–7929, 2024, doi: 10.36040/jati.v8i4.10457.
[22] A. B. Hikmah, “Optimasi Hyperparameter Ensemble Learning untuk Prediksi Penyakit Liver Berdasarkan Data Pasien,” J. SISKOM-KB (Sistem Komput. dan Kecerdasan Buatan), vol. 8, no. 3, 2025, doi: 10.47970/siskom-kb.v8i3.798.
[23] Hidayat, M. F. Wicaksono, Y. J. Wicaksono, S. M. Wibawa, and E. N. P. Septia, “Prediksi Penyakit Liver dengan Model Perbandingan Logistic Regression, Support Vector Machine, dan Random Forest,” Komputika J. Sist. Komput., vol. 15, no. 1, pp. 83–94, 2026, doi: 10.34010/komputika.v15i1.19799.
[24] A. D. Putra, D. Nurani, M. M. Dewi, A. N. Rahmi, and Supriatin, “Supervised Machine Learning Model untuk Prediksi Penyakit Hepatitis,” Indones. J. Comput. Sci., vol. 13, no. 2, pp. 3329–3338, 2024, doi: 10.33022/ijcs.v13i2.3817.
[25] C. Wungkana, M. Aror, and G. A. Sandag, “Model Prediksi Penderita HCC Menggunakan Algoritma Random Forest,” JUSTIN (Jurnal Sist. dan Teknol. Informasi), vol. 10, no. 1, 2022, doi: 10.26418/justin.v10i1.44103.
[26] A. A. Nopebrian, R. N. Shofa, and S. Yuliyanti, “Perbandingan Algoritma Pendekatan Supervised Learning Menggunakan Seleksi Fitur Chi-Square untuk Klasifikasi Status Kesehatan Jemaah Haji,” JUSTIN (Jurnal Sist. dan Teknol. Informasi), vol. 13, no. 1, 2025, doi: 10.26418/justin.v13i1.86639.
[27] 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. 2048, no. 1, 2024.
[28] 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.
[29] 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.
[30] M. Salsabil, N. L. Azizah, and A. Eviyanti, “Implementasi Data Mining dalam Melakukan Prediksi Penyakit Diabetes Menggunakan Metode Random Forest dan XGBoost,” J. Ilm. KOMPUTASI, vol. 23, no. 1, 2024, doi: 10.32409/jikstik.23.1.3507.
Copyright (c) 2026 Sri Novida Sari, Julham, Michael Stevano Sinurat, Dito Putro Utomo

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.



