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 AbstrakPenyakit 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.
Copyrights © 2026