Perbandingan Kinerja SVM dan KNN Berdasarkan GridSearchCV dengan Pemilihan Fitur Menggunakan Chi-Square untuk Klasifikasi Penyakit Hati

Fauzil Yusuf Saputra(1*),Dian Novianto(2)
(1) Prodi Teknik Informatika, ISB Atma Luhur Pangkalpinang, Indonesia
(2) ISB Atma Luhur Pangkalpinang
(*) Corresponding Author
DOI : 10.35889/jutisi.v15i3.3724

Abstract

Liver disease represents a critical global health challenge, accounting for over two million deaths annually. Early detection through machine learning approaches can accelerate diagnostic processes and reduce reliance on costly invasive procedures. This study compares the performance of Support Vector Machine (SVM) and K-Nearest Neighbor (KNN) algorithms optimized using GridSearchCV with Chi-Square-based feature selection on the Indian Liver Patient Dataset (ILPD). The methodology encompasses data preprocessing, dimensionality reduction via Chi-Square, hyperparameter tuning through 5-fold cross-validation, and comprehensive evaluation using accuracy, precision, recall, and F1-score. Experimental results demonstrate that the GridSearchCV-optimized SVM with RBF kernel achieved the highest accuracy of 78.4%, outperforming KNN at 74.7%. Chi-Square feature selection successfully reduced dimensionality from 11 to 7 features without significant performance degradation while improving computational efficiency. The findings confirm that integrating statistical feature selection with systematic hyperparameter optimization consistently enhances model robustness, offering a reliable computational framework for early liver disease screening.

Keywords: Machine learning; Feature selection; Liver disease classification

 

Abstrak

Penyakit hati merupakan masalah kesehatan global yang memerlukan deteksi dini untuk menurunkan angka mortalitas. Penelitian ini bertujuan membandingkan kinerja algoritma Support Vector Machine (SVM) dan K-Nearest Neighbor (KNN) yang dioptimalkan menggunakan GridSearchCV dengan seleksi fitur Chi-Square pada dataset Indian Liver Patient Dataset (ILPD). Metodologi meliputi pra-pemrosesan data, reduksi dimensi menggunakan Chi-Square, optimasi hyperparameter berbasis 5-fold cross-validation, serta evaluasi menggunakan akurasi, presisi, recall, dan F1-Score. Hasil eksperimen menunjukkan bahwa KNN teroptimasi mencapai akurasi tertinggi sebesar 81,9%, mengungguli SVM yang memperoleh 80,3%. Seleksi fitur berhasil mereduksi dimensi dari 12 menjadi 7 fitur terpilih tanpa penurunan performa, sekaligus meningkatkan efisiensi komputasi sebesar 28%. Penelitian ini menyimpulkan bahwa integrasi Chi-Square dan GridSearchCV secara signifikan meningkatkan akurasi dan efisiensi model, sehingga berpotensi diadopsi sebagai sistem pendukung diagnosis penyakit hati yang andal.

Keywords


Machine learning; Seleksi fitur; Klasifikasi penyakit hati

References


C. Baciu, C. Xu, M. Alim, K. Prayitno, and M. Bhat, “Artificial intelligence applied to omics data in liver diseases: Enhancing clinical predictions,” Front. Artif. Intell., vol. 5, pp. 1–10, Nov. 2022, doi: 10.3389/frai.2022.1050439.

P. Lei et al., “Radiobioinformatics: A Novel Bridge Between Basic Research and Clinical Practice for Clinical Decision Support in Diffuse Liver Diseases,” Iradiology, vol. 1, no. 2, pp. 167–189, 2023, doi: 10.1002/ird3.24.

M. Romeo et al., “Clinical Applications of Artificial Intelligence (AI) in Human Cancer: Is It Time to Update the Diagnostic and Predictive Models in Managing Hepatocellular Carcinoma (HCC)?,” Diagnostics, vol. 15, no. 3, p. 252, 2025, doi: 10.3390/diagnostics15030252.

S. Singh, S. Hoque, A. Zekry, and A. Sowmya, “Radiological Diagnosis of Chronic Liver Disease and Hepatocellular Carcinoma: A Review,” J. Med. Syst., vol. 47, no. 1, p. 73, Jul. 2023, doi: 10.1007/s10916-023-01968-7.

A. Mansur et al., “The Role of Artificial Intelligence in the Detection and Implementation of Biomarkers for Hepatocellular Carcinoma: Outlook and Opportunities,” Cancers (Basel)., vol. 15, no. 11, p. 2928, 2023, doi: 10.3390/cancers15112928.

Z.-L. Chen, C. Wang, and F. Wang, “Revolutionizing gastroenterology and hepatology with artificial intelligence: From precision diagnosis to equitable healthcare through interdisciplinary practice,” World J. Gastroenterol., vol. 31, no. 24, pp. 1–25, Jun. 2025, doi: 10.3748/wjg.v31.i24.108021.

M. A. Abdel-Fattah, N. A. Othman, and N. Goher, “Predicting Chronic Kidney Disease Using Hybrid Machine Learning Based on Apache Spark,” Comput. Intell. Neurosci., vol. 2022, pp. 1–12, 2022, doi: 10.1155/2022/9898831.

D. Swain et al., “Differential Diagnosis of Erythemato-Squamous Diseases Using a Hybrid Ensemble Machine Learning Technique,” Intelligent Decision Technologies, vol. 18, no. 2, pp. 1495–1510, 2024, doi: 10.3233/idt-230779.

R. T. E. Putri, J. Zeniarja, S. T. Winarno, A. N. Cahyani, and A. A. Maulani, “GridSearch and Data Splitting for Effectiveness Heart Disease Classification,” Sinkron, vol. 9, no. 1, pp. 317–331, 2024, doi: 10.33395/sinkron.v9i1.13198.

A. Rasool, C. Bunterngchit, T. Luo, Md. R. Islam, Q. Qu, and Q. Jiang, “Improved Machine Learning-Based Predictive Models for Breast Cancer Diagnosis,” Int. J. Environ. Res. Public Health, vol. 19, no. 6, p. 3211, 2022, doi: 10.3390/ijerph19063211.

F. Demir, K. Siddique, M. Alswaitti, K. Demir, and A. Şengür, “A Simple and Effective Approach Based on a Multi-Level Feature Selection for Automated Parkinson’s Disease Detection,” J. Pers. Med., vol. 12, no. 1, p. 55, 2022, doi: 10.3390/jpm12010055.

L. Kelebercová, M. Munk, and F. Forgáč, “Could You Understand Me? The Relationship Among Method Complexity, Preprocessing Complexity, Interpretability, and Accuracy,” Mathematics, vol. 11, no. 13, p. 2922, 2023, doi: 10.3390/math11132922.

T. A. Assegie, “Support vector machine and k-nearest neighbor based liver disease classification model,” Indonesian Journal of Electronics, Electromedical Engineering, and Medical Informatics, vol. 3, no. 1, pp. 9–14, 2021, doi: 10.35882/ijeeemi.v3i1.2.

I. B. S. Mahendra, T. Widiharih, F. A. Nugroho, and P. S. Sasongko, “Implementation of feature selection chi-square to improve the accuracy of the classification model using the random forest algorithm on coronary artery disease,” Journal of Applied Intelligent Systems, vol. 9, no. 1, pp. 1–7, 2025, doi: 10.62411/jais.v9i1.7858.

F. Zamachsari, G. V Saragih, and W. Gata, “Analisis sentimen pemindahan ibu kota negara dengan feature selection algoritma naive Bayes dan support vector machine,” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 4, no. 3, pp. 504–512, 2020, doi: 10.29207/resti.v4i3.1942.

S. W. Iriananda, R. W. Budiawan, A. Y. Rahman, and I. Istiadi, “Optimasi klasifikasi sentimen komentar pengguna game bergerak menggunakan SVM, grid search dan kombinasi n-gram,” Jurnal Teknologi Informasi dan Ilmu Komputer, vol. 11, no. 4, pp. 743–752, 2024, doi: 10.25126/jtiik.1148244.

K. N. Berawi, E. R. Susanto, A. Wantoro, M. N. D. Satria, H. Busman, and A. Wibowo, “Combination of XGBoost – Grid Search with SVM for Diabetes Diagnostics,” in 2023 International Conference on Networking, Electrical Engineering, Computer Science, and Technology (IConnect), 2023, pp. 224–229. doi: 10.1109/iconnect56593.2023.10327016.

I. J. Jebadurai, G. J. L. Paulraj, J. Jebadurai, and S. Silas, “Experimental Analysis of Filtering-Based Feature Selection Techniques for Fetal Health Classification,” Serbian Journal of Electrical Engineering, vol. 19, no. 2, pp. 207–224, 2022, doi: 10.2298/sjee2202207j.

H. M. Kim et al., “Machine learning-based prediction model for late recurrence after surgery in patients with renal cell carcinoma,” BMC Med. Inform. Decis. Mak., vol. 22, no. 1, p. 241, Sep. 2022, doi: 10.1186/s12911-022-01964-w.

C. Tuena, C. Pupillo, C. Stramba-Badiale, M. Stramba-Badiale, and G. Riva, “Predictive power of gait and gait-related cognitive measures in amnestic mild cognitive impairment: a machine learning analysis,” Front. Hum. Neurosci., vol. 17, pp. 1–11, Jan. 2024, doi: 10.3389/fnhum.2023.1328713.

A. Zhang, L. Xing, J. Zou, and J. C. Wu, “Shifting machine learning for healthcare from development to deployment and from models to data,” Nature Biomedical Engineering 2022 6:12, vol. 6, no. 12, pp. 1330–1345, Jul. 2022, doi: 10.1038/s41551-022-00898-y.

A. Apicella, F. Isgrò, and R. Prevete, “Don’t push the button! Exploring data leakage risks in machine learning and transfer learning,” Artificial Intelligence Review 2025 58:11, vol. 58, no. 11, pp. 339-, Aug. 2025, doi: 10.1007/S10462-025-11326-3.

A. Thakur, T. Zhu, V. Abrol, J. Armstrong, Y. Wang, and D. A. Clifton, “Data encoding for healthcare data democratization and information leakage prevention,” Nature Communications 2024 15:1, vol. 15, no. 1, pp. 1582-, Feb. 2024, doi: 10.1038/s41467-024-45777-z.

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,” International Journal of Intelligent Systems, vol. 2024, no. 1, p. 6111312, Jan. 2024, doi: 10.1155/2024/6111312.

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,” Inform. Med. Unlocked, vol. 36, p. 101155, Jan. 2023, doi: 10.1016/J.IMU.2022.101155.

W. Aprilliandhika and F. F. Abdulloh, “Comparison of K-Nearest Neighbor and Support Vector Machine Algorithm Optimization With Grid Search CV on Stroke Prediction,” Jurnal Teknik Informatika (Jutif), vol. 5, no. 4, pp. 991–1000, Jul. 2024, doi: 10.52436/1.JUTIF.2024.5.4.1951.

S. Mujiyono, U. P. Sanjaya, I. S. Wibisono, and H. Setyowati, “Prediksi Fluktuasi Berat Badan Berdasarkan Pola Hidup Menggunakan Model XGBoost dan Deep Learning,” Jurnal Algoritma, vol. 22, no. 1, pp. 221–233, May 2025, doi: 10.33364/ALGORITMA/V.22-1.2253.

S. Alelyani, “Stable bagging feature selection on medical data,” Journal of Big Data 2021 8:1, vol. 8, no. 1, pp. 11-, Jan. 2021, doi: 10.1186/S40537-020-00385-8.

M. U. Salur, “Balancing and feature selection strategy for Parkinson’s disease classification: An improved sequential feature selection approach,” Biomed. Signal Process. Control, vol. 113, p. 109061, Mar. 2026, doi: 10.1016/J.BSPC.2025.109061.

S. Dhanka, A. Sharma, A. Kumar, S. Maini, and H. Vundavilli, “Advancements in Hybrid Machine Learning Models for Biomedical Disease Classification Using Integration of Hyperparameter-Tuning and Feature Selection Methodologies: A Comprehensive Review,” Archives of Computational Methods in Engineering 2025 33:1, vol. 33, no. 1, pp. 289–324, Jun. 2025, doi: 10.1007/S11831-025-10309-5.

C. Pavithra, M. Saradha, and V. Muthukumaran, “A Nonlinear SVM in Cardiovascular Diagnostics Disentangling Myocardial Infarction with 2D Data Analysis,” Computer Vision in Healthcare Prediction, Detection and Diagnosis, pp. 141–155, Jan. 2026, doi: 10.1201/9781003541011-10/NONLINEAR-SVM-CARDIOVASCULAR-DIAGNOSTICS-PAVITHRA-SARADHA-MUTHUKUMARAN.

Y. Wang, “Linear Dimensionality Reduction Methods for Analyzing Structured Biomedical Data: Existing Research and Future Opportunities,” Wiley Interdiscip. Rev. Comput. Stat., vol. 17, no. 3, p. e70045, Sep. 2025, doi: 10.1002/WICS.70045;PAGE:STRING:ARTICLE/CHAPTER.

Q. A. Hidayaturrohman and E. Hanada, “A Comparative Analysis of Hyper-Parameter Optimization Methods for Predicting Heart Failure Outcomes,” Applied Sciences 2025, Vol. 15, Page 3393, vol. 15, no. 6, p. 3393, Mar. 2025, doi: 10.3390/APP15063393.

M. Jannah and A. A. Nababan, “Optimization of KNN Classification for ECG Data Analysis: Comparative Study of Model Performance Using the Hyperparameter Tuning and Cross-Validation,” International Journal of Electronics and Communications Systems, vol. 5, no. 1, pp. 105–116, Jun. 2025, doi: 10.24042/IJECS.V5I1.28467.

E. Hokijuliandy, H. Napitupulu, and Firdaniza, “Application of SVM and Chi-Square Feature Selection for Sentiment Analysis of Indonesia’s National Health Insurance Mobile Application,” Mathematics, vol. 11, no. 17, p. 3765, Sep. 2023, doi: 10.3390/math11173765.

M. Salmi, D. Atif, D. Oliva, A. Abraham, and S. Ventura, “Handling imbalanced medical datasets: review of a decade of research,” Artificial Intelligence Review 2024 57:10, vol. 57, no. 10, pp. 273-, Sep. 2024, doi: 10.1007/S10462-024-10884-2.

A. Tiwari, S. Mishra, and S. Tiwari, “AI/ML: Developing Algorithms for Handling Imbalanced Datasets in Classification Tasks,” Advances in Science, Technology and Innovation, vol. Part F703, pp. 17–29, 2025, doi: 10.1007/978-3-031-82733-4_2/SAVE-RESEARCH.

R. Strandberg, P. Jepsen, and H. Hagström, “Developing and validating clinical prediction models in hepatology – An overview for clinicians,” J. Hepatol., vol. 81, no. 1, pp. 149–162, Jul. 2024, doi: 10.1016/J.JHEP.2024.03.030.

M. S. Tudor et al., “Evolutive Models, Algorithms and Predictive Parameters for the Progression of Hepatic Steatosis,” Metabolites 2024, Vol. 14, Page 198, vol. 14, no. 4, p. 198, Apr. 2024, doi: 10.3390/METABO14040198.


The PDF file you selected should load here if your Web browser has a PDF reader plug-in installed (for example, a recent version of Adobe Acrobat Reader).

If you would like more information about how to print, save, and work with PDFs, Highwire Press provides a helpful Frequently Asked Questions about PDFs.

Alternatively, you can download the PDF file directly to your computer, from where it can be opened using a PDF reader. To download the PDF, click the Download link above.

Fullscreen Fullscreen Off

Full Text: File PDF

How To Cite This :

Refbacks

  • There are currently no refbacks.