Improving Liver Disease Classification Performance Using Random Forest Algorithm with Grid Search Hyperparameter Optimization

Authors

  • Tiarni Catherine Pesahlita LG Undergraduate Student, Information Technology Study Program, STIKOM Tunas Bangsa, Indonesia
  • Solikhun Information Technology Study Program, STIKOM Tunas Bangsa, Indonesia
  • Anjar Wanto Master's Program in Informatics, STIKOM Tunas Bangsa, Indonesia

DOI:

https://doi.org/10.52436/1.jutif.2026.7.5.5640

Keywords:

Grid Search, Hyperparameter Optimization, Liver Disease, Machine Learning, Random Forest

Abstract

Liver disease is one of the serious health problems that often develops without obvious early symptoms, making it difficult to detect early and increasing the risk of more severe complications. The main problem in the classification of liver disease is how to obtain a prediction model that has high accuracy and stability when faced with multivariate and complex medical data. Therefore, this study aims to improve the performance of liver disease classification by optimizing the Random Forest algorithm using the Grid Search hyperparameter optimization technique. The dataset used consisted of 1,700 patient data with eleven attributes that included demographic characteristics, lifestyle, medical risk factors, and liver function test results. The pre-processing stage includes data checking, feature normalization, and data sharing using a ratio of 80% trained data and 20% stratified test data. The Random Forest model is built as a base model and further optimized using Grid Search with a cross-validation scheme to obtain the best combination of hyperparameters. Model performance evaluation was carried out using accuracy, precision, recall, and F1-score metrics. The results showed that the baseline Random Forest model produced an accuracy of 89.71%, while after optimization using Grid Search, the accuracy increased to 91.18% accompanied by an increase in precision, recall, and F1-score values. These improvements show that the hyperparameter optimization process plays an important role in improving the generalization capabilities and stability of the model. The findings of this study confirm that the integration of Random Forest and Grid Search can be an effective approach to the classification of liver diseases and make a significant contribution to the development of medical decision support systems and the application of Machine Learning techniques in the field of health informatics.

Downloads

Download data is not yet available.

References

F. Muhammad et al., “Liver Ailment Prediction Using Random Forest Model,” Comput. Mater. Contin., vol. 74, no. 1, pp. 1049–1067, 2023, doi: 10.32604/cmc.2023.032698.

M. A. Al-Hashem, A. M. Alqudah, and Q. Qananwah, “Performance Evaluation of Different Machine Learning Classification Algorithms for Disease Diagnosis,” Int. J. E-Health Med. Commun., vol. 12, no. 6, pp. 1–28, 2021, doi: 10.4018/IJEHMC.20211101.oa5.

H. Ding, M. Fawad, and X. Xu, “A framework for identi fi cation and classi fi cation of liver diseases based on machine learning algorithms,” no. October, pp. 1–7, 2022, doi: 10.3389/fonc.2022.1048348.

P. Tripathi et al., “Classification of nucleic acid amplification on ISFET arrays using spectrogram-based neural networks,” Comput. Biol. Med., vol. 161, no. October 2022, p. 107027, 2023, doi: 10.1016/j.compbiomed.2023.107027.

A. E. Pranajaya and E. R. Susanto, "Random Forest Optimization for Heart Disease Prediction Using SMOTEENN and Grid Search Information Systems, Faculty of Engineering and Computer Science, Universitas Teknokrat Indonesia, Indonesia Random Forest Optimization for Heart Disease Prediction Using SM," Jpti, vol. 5, no. 7, pp. 1965–1979, 2025, doi: https://doi.org/10.52436/1.jpti.855.

W. El Atifi, “Optimizing ensemble machine learning models for accurate liver disease prediction in healthcare,” pp. 1–20, 2025, doi: 10.1371/journal.pone.0330899.

M. Nurkholifah and Y. Umar, "Indonesian Journal : Informatics and Communication Management MACHINE ALGORITHM PERFORMANCE ANALYSIS Journal Indonesia: Informatics and Communication Management," vol. 4, no. 1, pp. 164–172, 2023, doi: https://doi.org/10.35870/jimik.v4i1.149.

I. Herliawan et al., “Classification Of Liver Disease By Applying Random Forest,” vol. 6, no. 1, pp. 89–94, 2020, doi: 10.33480/jitk.v6i1.1424.

L. Huang, Y. Luo, L. Zhang, M. Wu, and L. Hu, “Machine learning ‑ based disease risk stratification and prediction of metabolic dysfunction ‑ associated fatty liver disease using vibration ‑ controlled transient elastography : Result from NHANES 2021 – 2023,” BMC Gastroenterol., 2025, doi: 10.1186/s12876-025-03850-x.

R. R. A. F. Mudhoffar and W. Widayat, “The Indonesian Journal of Computer Science,” vol. 13, no. 2, pp. 2519–2527, 2024, doi: https://doi.org/10.33022/ijcs.v14i2.4765.

N. H. Alfajr, G. Garno, and D. Yusup, "Comparative Study of Random Forest Classifier Algorithm and Support Vector Machine in Prediction of Heart Disease," J. Inform. and Tek. Electro Therapy., vol. 13, no. 3, pp. 22–30, 2025, doi: 10.23960/jitet.v13i3.6569.

K. Gupta, N. Jiwani, and N. Afreen, “1 th IEEE International Conference on Communication Systems and Network Technologies Liver Disease Prediction using Machine learning Classification Techniques,” pp. 221–226, 2022, doi: 10.1109/csnt.2022.40.

J. Zhao, P. Wang, and Y. Pan, “Predicting liver disorder based on machine learning models,” J. Eng., vol. 2022, no. 10, pp. 978–984, 2022, doi: 10.1049/tje2.12184.

S. Vithal, V. C. Kulkarni, and T. Sujata, “Liver Cirrhosis Prediction Using Random Forest,” vol. XIV, no. V, pp. 1079–1085, 2025, doi: 10.51583/IJLTEMAS.

N. H. Alfajr and S. Defiyanti, "Prediction of Heart Disease Using the Random Forest Method and the Application of Principal Component Analysis (PCA)," J. Inform. and Tek. Electro Therapy., vol. 12, no. 3S1, 2024, doi: 10.23960/jitet.v12i3s1.5055.

A. Setiawan, Z. H. Nst, Z. Khairi, and L. Efrizoni, "Risk Level Classification of DSetiawan, A., Nst, Z. H., Khairi, Z., & Efrizoni, L. (2024). Classification of diabetes risk levels using algorithms. 7(2), 263–271.IABETES USING ALGORITHMS," vol. 7, no. 2, pp. 263–271, 2024, doi: https://doi.org/10.36595/jire.v7i2.1259.

A. Rahmada, E. R. Susanto, S. Information, F. Teknik, and U. T. Indonesia, "Improving Heart Disease Prediction Accuracy with SMOTEENN Technique on Random Forest Algorithm," vol. 4, no. 12, pp. 795–803, 2024, doi: https://doi.org/10.52436/1.jpti.524.

R. Search, O. Using, R. Forest, A. For, and D. Prediction, “Random Search Optimization Using Random Forest Algorithm For Liver Disease Prediction,” vol. 2, no. 3, pp. 127–137, 2025, doi: https://doi.org/10.5281/zenodo.15468679.

Raja Darmawan, Yulison Herry Chrisnanto, and Gunawan Abdillah, "Classification of Thyroid Disease Diagnosis Using the Random Forest Method," J. Inform. and Electron Engineering., vol. 7, no. 2, pp. 203–209, 2024, doi: 10.36595/jire.v7i2.1214.

A. Christian, H. Hariyanto, A. Yani, and S. Sumanto, "Machine Learning Analysis for Lung Disease Prediction Using Random Forest," J. Innov. Future. Technol., vol. 7, no. 1, pp. 122–133, 2025, doi: 10.47080/iftech.v7i1.3906.

M. Y. Iskandar and H. W. Nugroho, “Comparative Evaluation of Decision Tree and Random Forest for Lung Cancer Prediction Based on Computational Efficiency and Predictive Accuracy,” J. Tek. Inform., vol. 6, no. 5, pp. 3392–3404, 2025, doi: 10.52436/1.jutif.2025.6.5.4877.

D. Aryo and N. Aini, “Grid Search CV Implementation in Random Forest Algorithm to Improve Accuracy of Breast Cancer Data,” vol. 12, no. 2, 2022.

I. G. A. G. Jayaditya, I. K. A, and Kadyana, "Implementation of Random Forest in Cardiovascular Disease Classification with Hyperparameter Tuning Grid Search," Jnatia, vol. 2, no. 1, pp. 219–226, 2023, doi: https://doi.org/10.24843/JNATIA.2023.v02.i01.p25.

S. Arshad, S. M. J. Zaidi, M. Ali, M. U. Hashmi, A. Manan, and A. Ahmad, “A Comparative Study of Machine Learning Models for Heart Disease Prediction Using Grid Search and Random Search for Hyperparameter Tuning,” J. Comput. Biomed. Informatics, vol. 8, no. 1, 2024, doi: https://doi.org/10.56979/801/2024.

M. Sholeh, U. Lestari, and D. Andayati, “Hyperparameter Optimization Using Grid Search and Random Search to Improve the Performance of Prediction Models with Decision Trees,” vol. 3, no. 03, pp. 453–464, 2025.

C. F. Britto, B. K. Das, and Y. V Patil, “Liver cancer disease prediction using anomaly detection and ensemble learning for neural network clustering and optimal tuning,” vol. 5, no. 2, pp. 1–6, 2024, doi: https://doi.org/10.33545/27076571.2024.v5.i2a.90.

M. D. Wardana, I. Budiman, F. Indriani, and D. T. Nugrahadi, “Implementation of Ant Colony Optimization in Obesity Level Classification Using Random Forest,” vol. 6, no. 5, pp. 3543–3557, 2025, doi: https://doi.org/10.52436/1.jutif.2025.6.5.4696 Implementation.

R. R. Pratama, R. R. Suryono, S. Information, and U. T. Indonesia, "Performance Comparison Of Naive Bayes, Support Vector Machine And Random Forest Algorithms For Apple Vision Pro Sentiment Analysis," vol. 6, no. 1, pp. 31–39, 2025, doi: https://doi.org/10.52436/1.jutif.2025.6.1.4035.

Suci Amaliah, M. Nusrang, and A. Aswi, "Application of the Random Forest Method for the Classification of Coffee Drink Variants in Konijiwa Bantaeng Coffee Shops," VARIANSI J. Stat. Its Appl. Teach. Res., vol. 4, no. 3, pp. 121–127, 2022, doi: 10.35580/variancem31.

S. W. Iriananda, R. W. Budiawan, and A. Y. Rahman, "Optimizing Sentiment Classification of Mobile Game User Reviews Using Svm, Grid Search And N-Gram Combinations," vol. 11, no. 4, 2024, doi: 10.25126/jtiik.1148244.

Additional Files

Published

2026-10-10

How to Cite

[1]
T. C. P. LG, S. Solikhun, and A. Wanto, “Improving Liver Disease Classification Performance Using Random Forest Algorithm with Grid Search Hyperparameter Optimization”, J. Tek. Inform. (JUTIF), vol. 7, no. 5, pp. 4710–4721, Oct. 2026.

Most read articles by the same author(s)