Abstract
This paper explores the integration of machine learning algorithms with hydrological data to improve water quality assessment for sustainable crop growth. Focusing on diverse metrics such as sulfate, organic carbon, solids, p H, hardness, chloramines, trihalomethanes, and turbidity, the study follows a structured workflow involving thorough data collection, quality assessment, and visualization through Exploratory Data Analysis (EDA). Addressing challenges like missing values and outliers, the paper employs Investigative Data Analysis (EDA) to ensure dataset reliability. Class imbalance is tackled using Synthetic Minority Over-sampling Technique (SMOTE) and standard scaling for consistent feature normalization. In the modeling phase, classifiers including AdaBoost, Bagging, Gradient Boosting, Decision Tree, Extra Tree, K-Nearest Neighbors, and XGBoost undergo cross-validation. Hyperparameter optimization is performed through grid search for Gradient Boosting and Bagging classifiers. Results indicate that XGBClassifier achieves the highest accuracy (0.789634), followed by GradientBoosting-Classifier (0.785061), BaggingClassifier (0.786585), and XGBClassifier (0. 7 8 9 6 3 4). These findings highlight the efficacy of machine learning in enhancing water quality assessment for sustainable agriculture.