Joint Feature Selection and Hyperparameter Optimization of Support Vector Machines for Drinking Water Potability Classification

Siti Rahena binti Isa(1*), Nur Mardiana binti Ramli(2), Hartini Damanik(3), Gerhard Wilhelm Weber(4),

(1) Department of Electrical Engineering, Politeknik Sultan Abdul Halim Mu'adzam Shah, Malaysia
(2) Department of Electrical and Electronic Engineering, Politeknik Kuching Sarawak, Sarawak, Malaysia
(3) Informatics, STIKOM Tunas Bangsa, Pematangsiantar, North Sumatra, Indonesia
(4) Faculty of Engineering Management, Poznan University of Technology, Greater Poland, Poland
(*) Corresponding Author

Abstract


Reliable drinking-water potability screening requires attention to class-specific errors as well as aggregate accuracy. This study evaluated whether joint feature selection and Bayesian optimization of a support vector machine (SVM) improves macro-averaged F1 while reducing the physicochemical measurements required for classification. A publicly available water-potability dataset comprising 3,276 records and nine predictors was assessed using a prespecified stratified 70/15/15 partition, training-fold preprocessing, three-fold internal cross-validation, matched search budgets, and a 492-record holdout. The proposed joint Bayesian SVM achieved a holdout macro-F1 of 0.6417 with five features, compared with 0.5930 for the default nine-feature SVM, 0.6060 for random-search SVM, and 0.6099 for random joint search. Positive-class recall increased from 0.2813 to 0.4948 relative to the default SVM, whereas overall accuracy decreased slightly from 0.6789 to 0.6707. The primary paired-bootstrap difference in macro-F1 relative to random-search SVM was 0.0357 (descriptive 95% confidence interval: −0.0093 to 0.0817), preventing a conclusive superiority claim over a search-budget-matched control. The bootstrap intervals were calculated from fixed holdout predictions and do not measure uncertainty from retraining, repeated feature selection, or changes in water-quality distributions. The method therefore demonstrates a promising feature-efficiency and sensitivity trade-off on one holdout, but not established optimizer superiority or operational water-safety readiness. Replication across seeds, sampling sites, and independent water-quality datasets is required.

Full Text:

PDF

References


A. M. Elshewey, R. Y. Youssef, H. M. El-Bakry, and A. M. Osman, “Water potability classification based on hybrid stacked model and feature selection,” Environmental Science and Pollution Research, vol. 32, no. 13, pp. 7933–7949, 2025, doi: 10.1007/s11356-025-36120-0.

B. Bischl et al., “Hyperparameter optimization: Foundations, algorithms, best practices, and open challenges,” WIREs Data Mining and Knowledge Discovery, vol. 13, no. 2, p. e1484, 2023, doi: 10.1002/widm.1484.

D. R. Roberts et al., “Cross-validation strategies for data with temporal, spatial, hierarchical, or phylogenetic structure,” Ecography, vol. 40, pp. 913–929, 2017, doi: 10.1111/ecog.02881.

T. de Menezes e Silva Filho, H. Song, M. Perello-Nieto, R. Santos-Rodriguez, M. Kull, and P. Flach, “Classifier calibration: A survey on how to assess and improve predicted class probabilities,” Mach. Learn., vol. 112, no. 9, pp. 3211–3260, 2023, doi: 10.1007/s10994-023-06336-7.

M. Chen and Z. Liu, “Predicting performance of students by optimizing tree components of random forest using genetic algorithm,” Heliyon, vol. 10, no. 12, p. e32570, 2024, doi: 10.1016/j.heliyon.2024.e32570.

J. Pan, X. Guo, H. Fu, Y. Zhang, and J. Zhang, “Machine learning prediction of building energy consumption by combining Bayesian optimization and the SHAP model,” Int. J. Green Energy, vol. 23, no. 8, pp. 1530–1545, 2026, doi: 10.1080/15435075.2026.2619448.

R. El-Bacha, A. Salhi, H. Abderrafia, and S. Rabi, “Predicting water potability using a machine learning approach,” Environmental Challenges, 2025, doi: 10.1016/j.envc.2025.101131.

E. A. M. Pereira, J. F. S. Santos, and E. A. Barboza, “An energy efficient TinyML model for a water potability classification problem,” Sustainable Computing: Informatics and Systems, 2024, doi: 10.1016/j.suscom.2024.101010.

X. Yan, T. Zhang, W. Du, Q. Meng, X. Xu, and X. Zhao, “A Comprehensive Review of Machine Learning for Water Quality Prediction over the Past Five Years,” J. Mar. Sci. Eng., 2024, doi: 10.3390/jmse12010159.

A. Lokman, W. Z. Wan Ismail, and N. A. Ab Aziz, “A Review of Water Quality Forecasting and Classification Using Machine Learning Models and Statistical Analysis,” Water (Basel)., 2025, doi: 10.3390/w17152243.

L. Sasse, E. Nicolaisen-Sobesky, J. Dukart, and others, “Overview of leakage scenarios in supervised machine learning,” J. Big Data, 2025, doi: 10.1186/s40537-025-01193-8.

S. Z. Farzana, D. R. Paudyal, S. Chadalavada, and M. J. Alam, “Temporal Dynamics and Predictive Modelling of Streamflow and Water Quality Using Advanced Statistical and Ensemble Machine Learning Techniques,” Water (Basel)., 2024, doi: 10.3390/w16152107.

A. Apicella, F. Isgrò, and R. Prevete, “Don’t push the button! Exploring data leakage risks in machine learning and transfer learning,” Artif. Intell. Rev., 2025, doi: 10.1007/s10462-025-11326-3.

J. Josse, J. M. Chen, N. Prost, G. Varoquaux, and E. Scornet, “On the consistency of supervised learning with missing values,” Statistical Papers, 2024, doi: 10.1007/s00362-024-01550-4.

C.-C. Chang, Y. Chen, and C.-Y. Chen, “Towards decision-ready explainable machine learning for water quality management using a consistency index and cross-validated feature-selection framework,” Environ. Res., 2026, doi: 10.1016/j.envres.2026.124207.

M. A. A. M. Hridoy, A. I. Shawkat, C. Bordin, and others, “Advanced machine learning models for accurate water quality classification and WQI prediction: Implications for aquatic disease risk management,” Science of the Total Environment, 2025, doi: 10.1016/j.scitotenv.2025.180965.

F. Abbas, Z. Cai, M. Shoaib, J. Iqbal, M. Ismail, and others, “Machine Learning Models for Water Quality Prediction: A Comprehensive Analysis and Uncertainty Assessment in Mirpurkhas, Sindh, Pakistan,” Water (Basel)., 2024, doi: 10.3390/w16070941.

I. Said, “Machine learning for water quality management: a systematic review of prediction models, data challenges, and future directions,” Environ. Sci. Eur., 2026, doi: 10.1186/s12302-026-01430-8.

M. Wang, Y. Yang, F. Li, L. Liu, and W. Cao, “A novel robust mixture-of-experts model with causal priors for interpretable water quality diagnosis,” Advanced Engineering Informatics, 2026, doi: 10.1016/j.aei.2025.104267.

R. Jongjaraunsuk, W. Taparhudee, and P. Suwannasing, “Comparison of Water Quality Prediction for Red Tilapia Aquaculture in an Outdoor Recirculation System Using Deep Learning and a Hybrid Model,” Water (Basel)., 2024, doi: 10.3390/w16060907.

F. Bouchraki, S. Hamchaoui, L. L. Ayad, Y. Fetouh, C. Mezhoud, and A. Berreksi, “Water Quality Assessment Using the Random Forest Classification Model,” Water Environment Research, 2025, doi: 10.1002/wer.70197.

R. Iranzad and X. Liu, “A review of random forest-based feature selection methods for data science education and applications,” Int. J. Data Sci. Anal., 2025, doi: 10.1007/s41060-024-00509-w.

P. Singh, T. Hasija, S. Bharany, and others, “An ensemble-driven machine learning framework for enhanced water quality classification,” Discover Sustainability, 2025, doi: 10.1007/s43621-025-01467-4.

J. da S. Bohrer and M. Dorn, “Enhancing classification with hybrid feature selection: A multi-objective genetic algorithm for high-dimensional data,” Expert Syst. Appl., 2024, doi: 10.1016/j.eswa.2024.124518.

L. Díaz-González, R. A. Aguilar-Rodríguez, J. C. Pérez-Sansalvador, and N. Lakouari, “AQuA-P: A machine learning-based tool for water quality assessment,” J. Contam. Hydrol., 2025, doi: 10.1016/j.jconhyd.2025.104498.

Z. Han, S. Zhang, L. He, and B. Zhu, “Predicting and investigating water quality index by robust machine learning methods,” J. Environ. Manage., 2025, doi: 10.1016/j.jenvman.2025.125156.

R. Xu, S. Hu, H. Wan, Y. Xie, Y. Cai, and J. Wen, “A unified deep learning framework for water quality prediction based on time-frequency feature extraction and data feature enhancement,” J. Environ. Manage., 2024, doi: 10.1016/j.jenvman.2023.119894.

Y. Bai, M. Peng, and M. Wang, “A River Water Quality Prediction Method Based on Dual Signal Decomposition and Deep Learning,” Water (Basel)., 2024, doi: 10.3390/w16213099.

H. Kaur, B. S. Bansod, P. Khungar, and C. Dhawan, “Combining clustering and ensemble learning for groundwater quality monitoring: a data-driven framework for sustainable water management,” Environmental Science and Pollution Research, 2025, doi: 10.1007/s11356-025-36477-2.

S. Zhao et al., “Water quality estimation and algae bloom prediction using machine learning – A case study,” Journal of Water Process Engineering, 2025, doi: 10.1016/j.jwpe.2025.109161.


Refbacks

  • There are currently no refbacks.


Copyright (c) 2026 Zahra: Bulletin Big data, Data Science and Artificial Intelligence

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