Safe drinking water quality is essential for public health, yet environmental pollution has significantly degraded its quality. Manual methods such as WQI and STORET are inefficient, prompting this study to propose a machine learning-based classification system for more accurate water potability assessment. The Water Potability dataset from Kaggle is used, consisting of 3,276 samples with nine key parameters. The preprocessing stage includes data imputation, normalization, feature engineering, and oversampling with SMOTE. The applied models include LGBM, Random Forest, GBM, and XGBoost, optimized using Bayesian techniques and stacking ensemble to enhance accuracy. Results show that the stacking ensemble achieves an accuracy of 85.38%, precision of 88.02%, recall of 85.38%, and F1-score of 85.23%, outperforming individual models. This system enables real-time water quality monitoring with faster and more accurate results, supporting decision-making in sanitation policies and clean water availability.
                        
                        
                        
                        
                            
                                Copyrights © 2025