Assessment of water quality is essential for monitoring the environment and sustainable resource management. However, complex physicochemical parameters and class imbalance pose challenges for reliable predictive modeling. Although the multilayer perceptron (MLP) is widely applied for classification tasks, its performance depends strongly on effective hyperparameter optimization. This study evaluates three metaheuristic approaches—Bayesian optimization (BO), genetic algorithm (GA), and particle swarm optimization (PSO)—to enhance the performance of MLP on an imbalanced water potability dataset, which is addressed using synthetic minority over-sampling technique (SMOTE). Experimental results obtained using stratified 10-fold cross-validation demonstrate consistent improvements over the baseline MLP (accuracy of 0.7899±0.013). BO and GA improve predictive performance, while PSO achieves the best overall results with an accuracy of 0.9324±0.006, F1-score of 0.9338±0.006, and receiver operating characteristic–area under the curve (ROC–AUC) of 0.9652±0.005. The findings indicate that PSO provides superior convergence stability and generalization by effectively balancing exploration and exploitation during hyperparameter search. The integration of class balancing and swarm-based optimization substantially enhances classification robustness and discriminative capability, supporting its applicability for intelligent water quality monitoring systems.
Copyrights © 2026