Analysis Of The Effect Of Gridsearchcv Hyperparameter Tuning Strategy With Variations In Scoring, Test Size, And Random State On Water Quality Classification Performance Using SVM RBF Kernel

Authors

  • Rafli Ardiansyah Faculty of Engineering and Computer Science, Informatics Engineering, Universitas Nusantara PGRI Kediri, Kediri City, East Java, Indonesia
  • Danar Putra Pamungkas Faculty of Engineering and Computer Science, Informatics Engineering, Universitas Nusantara PGRI Kediri, Kediri City, East Java, Indonesia
  • Made Ayu Dusea Widyadara Faculty of Engineering and Computer Science, Informatics Engineering, Universitas Nusantara PGRI Kediri, Kediri City, East Java, Indonesia
  • Agoes Santika Department of Electrical Engincering and Informatics, Universitas Negeri Malang, Malang, East Java, Indonesia

DOI:

https://doi.org/10.24269/mtkind.v20i1.13841

Keywords:

Support Vector Machine, GridSearchCV, Hyperparameter Tuning, Scoring Metric, Water Quality Classification

Abstract

The choice of scoring metric in hyperparameter tuning using GridSearchCV is often overlooked, even though this decision directly affects the resulting model's behavior. This study analyzes the impact of scoring metric variations (accuracy, precision, recall), test size (70/30 and 80/20), and random state (0, 21, 42) on the performance of a Support Vector Machine (SVM) with RBF kernel for water quality classification. The dataset used is a combination of two public datasets from Kaggle totaling 4,259 samples, using three parameters: pH, conductivity, and turbidity, labeled based on WHO standards and Indonesian Ministry of Health Regulation No. 32 of 2017. The experiment was designed across 6 scenarios combined with three scoring metrics, resulting in 18 test configurations. Results show that accuracy and precision scoring produce excellent and consistent performance with accuracy ranging from 0.985–0.996 and F1-score of 0.98–1.00 across all scenarios. In contrast, recall scoring causes systematic model degeneration: the model consistently predicts all samples as the positive class (TN=0), resulting in accuracy of only approximately 0.50. This phenomenon occurs because GridSearchCV exploits the mathematical definition of recall by selecting parameters that produce a trivial classifier. These findings demonstrate that on a balanced dataset, using recall as the sole scoring metric is counterproductive, and F1-score or accuracy is more recommended as a safe metric for model optimization.

Downloads

Download data is not yet available.

References

[1] E. I. Saputra, M. K. Anam, H. Yenni, H. Hamdani, and A. Zamsuri, “OPTIMALISASI ALGORITMA SUPPORT VECTOR MACHINE PADA ASPECT-. 7, no. 1, pp. 271–279, 2025, Accessed: Jun. 16, 2026. [Online]. Available: https://doi.org/10.31849/zn.v7i1.17800

[2] I. Nurul Hidayah, “OPTIMASI HYPERPARAMETER TUNING MENGGUNAKAN GRIDSEARCHCV PADA METODE RANDOM FOREST DAN SUPPORT VECTOR MACHINE (SVM) UNTUK KLASIFIKASI STATUS INDEKS PEMBANGUNAN MANUSIA DI INDONESIA TAHUN 2022,” 2024, Accessed: Jun. 15, 2026. [Online]. Available: http://digilib.unila.ac.id/id/eprint/81889

[3] A. Riqza Ardiansyah and D. Putra Pamungkas, “KLASIFIKASI MENGGUNAKAN METODE SUPPORT VECTOR MACHINE UNTUK MENDETEKSI PENYAKIT TANAMAN BAWANG MERAH,” Jurnal Nusantara Of Engineering, vol. 7, 2024, [Online]. Available: https://ojs.unpkediri.ac.id/index.php/noe

[4] M. Biji Kopi, M. Nur Ichsan, M. Ayu Dusea Widyadara, and U. Mahdiyah, “Prosiding SEMNAS INOTEK (Seminar Nasional Inovasi Teknologi) 2025 1024 P emanfaatan Support Vector Machine dalam,” Online, 2025. Accessed: Jun. 15, 2026. [Online]. Available: https://doi.org/10.29407/75j7ar20

[5] I. W. A. Sparta and P. E. Parianthana, “Support Vector Machine Performance In Diabetes Data Classification With GridsearchCV Optimization,” Jurnal Multidisiplin Sahombu, vol. 5, no. 01, pp. 179–186, 2025, Accessed: Jun. 16, 2026. [Online]. Available: https://ejournal.seaninstitute.or.id/index.php/JMS/article/view/6215

[6] G. L. Pritalia, “Analisis Komparatif Algoritme Machine Learning pada Klasifikasi Kualitas Air Layak Minum,” 2022. Accessed: Jun. 15, 2026. [Online]. Available: doi: 10.24002/konstelasi.v2i1.5630

[7] S. Ramya, S. Srinath, and P. Tuppad, “Comprehensive analysis of multiple classifiers for enhanced river water quality monitoring with explainable AI,” Case Studies in Chemical and Environmental Engineering, vol. 10, Dec. 2024, doi: 10.1016/j.cscee.2024.100822.

[8] A. Rácz, D. Bajusz, and K. Héberger, “Effect of dataset size and train/test split ratios in qsar/qspr multiclass classification,” Molecules, vol. 26, no. 4, Feb. 2021, doi: 10.3390/molecules26041111.

[9] T. Horváth, R. G. Mantovani, and A. C. de Carvalho, “Effects of random sampling on svm hyper-parameter tuning,” in International Conference on Intelligent Systems Design and Applications, Springer, 2016, pp. 268–278. Accessed: Jun. 16, 2026. [Online]. Available: https://link.springer.com/chapter/10.1007/978-3-319-53480-0_27

[10] M. K. Nallakaruppan, E. Gangadevi, M. L. Shri, B. Balusamy, S. Bhattacharya, and S. Selvarajan, “Reliable water quality prediction and parametric analysis using explainable AI models,” Sci. Rep., vol. 14, no. 1, Dec. 2024, doi: 10.1038/s41598-024-56775-y.

[11] A. B. Koli, B. Faijan, S. Akil, B. Kantilal, D. Madhukar, and P. R. Sanjay, “A Hybrid Approach to Water Quality Classification Using SVM and Xgboost Method”, doi: 10.51244/IJRSI.

[12] J. Maulani and M. Sari, “Komparasi Metode K-Nearest Neighbor (Knn) Dengan Support Vector Machine (Svm) Terhadap Tingkat Akurasi Klasifikasi Kualitas Air,” 2023. Accessed: Jun. 16, 2026. [Online]. Available: DOI:10.30591/smartcomp.v12i2.4205

[13] Stacyana Jesika, Suci Ramadhani, and Yohanna Permata Putri, “Implementasi Model Machine Learning dalam Mengklasifikasi Kualitas Air,” Jurnal Ilmiah Dan Karya Mahasiswa, vol. 1, no. 6, pp. 382–396, Nov. 2023, doi: 10.54066/jikma.v1i6.1162.

[14] M. Junus and F. Abdillah, PENERAPAN METODE SUPPORT VECTOR MACHINE UNTUK KLASIFIKASI KUALITAS AIR MINUM BERBASIS IOT. 2025. Accessed: Jun. 16, 2026. [Online]. Available: https://www.researchgate.net/publication/389945680_PENERAPAN_METODE_SUPPORT_VECTOR_MACHINE_UNTUK_KLASIFIKASI_KUALITAS_AIR_MINUM_BERBASIS_IOT

[15] World Health Organization, Guidelines for Drinking-water Quality, 4th edition. Geneva: WHO press, 2011.

[16] Kementerian Kesetahan Republik Indonesia, “Peraturan Menteri Kesehatan Republik Indonesia Nomor 32 Tahun 2017 tentang Standar Baku Mutu Kesehatan Lingkungan,” Jakarta, 2017.

[17] N. P. E. M. Anggarini and A. Muliantara, “Memprediksi Kelulusan Mahasiswa Graduate dan Dropout dengan Support Vector Machine dan GridSearchCV,” Jurnal Nasional Teknologi Informasi dan Aplikasinya, vol. 2, no. 3, pp. 475–480, 2024, Accessed: Jun. 16, 2026. [Online]. Available: DOI: https://doi.org/10.24843/JNATIA.2024.v02.i03.p04

[18] F. Dewi, N. C. H. Wibowo, M. R. Handayani, and K. Umam, “Evaluasi Hyperparamter Tuning Pada Support Vector Machine (Svm) Dalam Klasifikasi Ulasan Hotel Di Tripadvisor,” JIPI (Jurnal Ilmiah Penelitian dan Pembelajaran Informatika), vol. 10, no. 3, pp. 2584–2593, 2025, Accessed: Jun. 16, 2026. [Online]. Available: DOI: https://doi.org/10.29100/jipi.v10i3.7774

[19] N. Nuraeni, “Klasifikasi dengan metode Support Vector Machine (SVM) dalam menentukan kualitas air minum,” Maliki Interdisciplinary Journal, vol. 3, no. 6, pp. 2248–2258, 2025, Accessed: Jun. 16, 2026. [Online]. Available: https://urj.uin-malang.ac.id/index.php/mij/article/view/14528

[20] N. W. A. Prasetya, L. P. Wanti, R. Purwanto, I. Bahroni, and R. Listyaningrum, “Evaluasi Kinerja Model Machine Learning dalam Klasifikasi Penyakit THT: Studi Komparatif Naï ve Bayes, SVM, dan Random Forest,” Infotekmesin, vol. 16, no. 2, pp. 312–320, 2025, Accessed: Jun. 16, 2026. [Online]. Available: DOI: https://doi.org/10.35970/infotekmesin.v16i2.2798

[21] “Evaluation Metrics in Machine Learning - GeeksforGeeks.” Accessed: Nov. 04, 2025. [Online]. Available: https://www.geeksforgeeks.org/machine-learning/metrics-for-machine-learning-model/

[22] D. Tao and X. Tang, “Random sampling based SVM for relevance feedback image retrieval,” in Proceedings of the 2004 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2004. CVPR 2004., IEEE, 2004, pp. II–II. Accessed: Jun. 16, 2026. [Online]. Available: DOI: 10.1109/CVPR.2004.1315225

Downloads

Published

2026-06-20

How to Cite

Ardiansyah, R., Danar Putra Pamungkas, Made Ayu Dusea Widyadara, & Agoes Santika. (2026). Analysis Of The Effect Of Gridsearchcv Hyperparameter Tuning Strategy With Variations In Scoring, Test Size, And Random State On Water Quality Classification Performance Using SVM RBF Kernel. MULTITEK INDONESIA : JURNAL ILMIAH, 20(1), 104–115. https://doi.org/10.24269/mtkind.v20i1.13841