Deep learning-based water quality index classification using stacked ensemble variational mode decomposition

Water is crucial to human survival in general, and determining the WQI (water quality index) is one of the primary aspects. The existing water quality classification models are facing various challenges and gaps that are impeding their effectiveness. These challenges include limited data availability, the intricate nature of water systems, spatial and temporal variability, non-linear relationships, sensor noise, and error, interpretability, and explainability. It is imperative to address these challenges to improve the accuracy and efficacy of the models and to ensure that they continue to serve as reliable tools for monitoring and safeguarding water quality. To solve the issues, this paper proposes a Stacked Ensemble efficient long short-term memory (StackEL) model for an efficient water quality index classification. At first, the raw input data is pre-processed to rescale the input data using data normalization and one-hot encoding. After that, the process known as variational mode decomposition (VMD) is applied to get at the intrinsic mode functions (IMFs). Consequently, feature selection is performed using an extended coati optimization (EX-CoA) algorithm to select the most significant attributes from the feature selection. Here, publicly available datasets, namely the water quality dataset from Kaggle, are used for classification and performed using are used to perform the Stacked Ensemble efficient long short-term memory (StackEL) classification process effectively. To further perfect the proposed prediction model, the Dwarf Mongoose optimization (DMO) method is implemented. Several measures of effectiveness are examined. When compared to other existing models, the suggested model can achieve a high accuracy of 98.85% of the water quality dataset.


Introduction
Freshwater ecosystems are vital for supporting life on Earth, playing essential roles in environmental stability, economic prosperity, and societal well-being [1].These ecosystems, which include rivers, streams, lakes, and underground aquifers, serve as the primary sources of freshwater for terrestrial and aquatic organisms, including humans [2].They contribute to water purification, climate regulation, and biodiversity conservation, providing habitats for numerous species of plants and animals [3].Moreover, freshwater resources are indispensable for various human activities, such as agriculture, fisheries, transportation, and recreation.They serve as crucial water sources for irrigation, drinking, and industrial processes, supporting agricultural production and economic development [4].However, despite their importance, freshwater ecosystems face significant threats from human-induced pollution and climate change.Pollution from industrial activities, agricultural runoff, urban development, and improper waste disposal contaminates freshwater bodies, degrading water quality and promising, as the model was found to be effective in accurately classifying the water quality index, while also being more efficient than the existing method.
The important contributions of the suggested water quality index approaches are given as follows: • To remove the unwanted data by performing the data normalization technique • To extract the different kinds of features by using the Variational mode decomposition algorithm (VMD).
• To select the optimal features using an extended coati optimization algorithm (EX-CoA).
• To use the Dwarf Mongoose optimization (DMO) algorithm in the prediction stage to fine-tune the forecast model in the best way possible.
The suggested system is structured as follows: The 2 section summarizes several relevant works based on water quality index classifications, and the 3 section describes the proposed system technique.The 4 section describes the paper's results and discussion, and the 5 section discusses the paper's conclusion and future study.

Literature review
This section presents the literature survey of the most recent and innovative techniques related to water quality index classification.
Sha et al [21] created a technique that hybridizes a convolutional neural network and long short-term memory (CNN-LSTM) to predict the real-time monitoring of WQI.The study used data from the Xin'anjiang River in China, which was collected from 2015 to 2020, and consisted of 10,326 records.Two types of data inputs were used for the DL models: original one-dimensional time series and two-dimensional grey images created by the complete ensemble empirical mode decomposition algorithm with adaptive noise (CEEMDAN) decomposition.The models were used to forecast the real-time monitoring of dissolved oxygen (DO) and total nitrogen (TN).Based on the Coefficient of efficiency (CE), root mean square error (RMSE), and mean absolute percentage error (MAPE) metrics, the input data preprocessed by the CEEMDAN method improved the forecasting performance of the deep learning models.The CNN-LSTM model was especially effective when predicting non-periodic parameters of TN.However, the method has to high model complexity and high complex complexity.
Vijay et al [22] focus on predicting the WQI of water samples collected from 1944 wells in the Vellore district.The study uses an Artificial Neural Networks (ANN) technique that combines three activation functions such as Tanh, Maxout, and rectifier.The model uses 15 groundwater variables collected from different parts of the Vellore district from 2008 to 2017.If all 15 variables meet the desired range, the WQI is considered suitable for drinking.When any of the values fall outside the desired range, it is considered unsuitable for drinking.The study aims to reduce computational time and improve the performance of the model.The suggested method improves the performance of the RMSE and MAPE obtained.Effectively managing water resources and training the model with a large dataset are challenges that need to be addressed.
Khullar et al [23] developed a new model to predict water quality factors in the Yamuna River in India.The existing models only focus on the learning process without considering a loss function related to training error or missing value imputation.The new model called the deep learning-based Bi-LSTM (DLBL-WQA) model, improves forecasting accuracy by imputing missing values, generating feature maps, employing Bi-LSTM architecture, and applying an optimized loss function to reduce training error.The researchers collected water quality data in Delhi for 6 years and found that the DLBL-WQA model improved the performance metrics of the root mean square error (RMSE) to 0.108, mean absolute error (MAE) to 0.124, mean squared error (MSE) to 0.107, and mean absolute percentage error (MAPE) to 18.22.The model shows close agreement between predicted and actual values and indicates the possibility of revealing future trends.However, the DLBL-WQA model is still facing issues of higher computational complexity.
Chen et al [24] developed a model called AEABC-BPNN that combines Adaptive Evolutionary Artificial Bee Colony and Back Propagation Neural Networks.The main objective of this model is to predict long-term WQI.It enhances the ability to learn the WQI and improve accuracy.The model was tested on the Luoyang River Basin and revealed patterns in WQI over time, validating the model's reliability using up to nine months of case data.The suggested method works better on a real-time dataset, lowering the mean square error (MSE) to 0.075 and the MAPE to 3.3%.The AEABC-BPPN model has a problem of overfitting because it calculates in months, making it less reliable.This model can fill gaps in historical water quality conditions and predict future water quality changes, but its overfitting issue reduces its effectiveness.
Ahmed et al [25] have developed a new method to forecast water quality using a combination of remote sensing and deep learning techniques.This method helps to assess water quality more efficiently.The study evaluated several deep learning models such as CNN, fully connected network (FCN), recurrent neural network (RNN), multi-layer perceptron (MLP), and LSTM for estimating the concentration of two parameters, electric conductivity (EC) and dissolved oxygen (DO).These parameters are essential for measuring the levels of impurities and oxygen in water.The proposed solution uses data from Landsat-8 from 2014 to 2021 and has a performance rate of RMSE to 281.93, MAE to 234.23, and MAPE to 0.325.However, the method's drawback is that it may not always classify water quality accurately.The research findings can help improve water management techniques and ultimately benefit society.The existing classification method performance is shown in table 1.
Previous works on WQI systems have been found to have several drawbacks.These include high model complexity and complex complexity [21], a large amount of required training dataset [22], high computational complexity [23], overfitting issues [24], less accurate water quality classification [25], high accessibility and cost, slower execution speed, and the need for more training data.To address these limitations, a novel strategy for a deep learning-based water quality index classification using a stacked ensemble variational mode decomposition model is proposed.This model is aimed at overcoming the shortcomings of traditional methodologies.As a result, the proposed model is presented to overcome the shortcomings of traditional methodologies.

Proposed methodology
Water is crucial to human survival in general, and determining the WQI is one of the primary aspects.This research offers a stacked ensemble Variational mode decomposition model for deep learning-based water quality index classification.Several procedures accompany the classification of WQI, beginning with preprocessing and continuing via feature extraction, feature selection, and finally classification.Figure 1 depicts the proposed methodology for classifying water quality.
Here, initially, the raw input data undergoes preprocessing, which involves rescaling the input data using data normalization and one-hot encoding.VMD is used to extract the IMFs, and the extended coati optimization algorithm (EX-CoA) is used to choose the best features.Finally, the StackEL model classifies water quality into four categories: soft (0-60 mg/L), moderately hard (60-120 mg L −1 ), hard (120-180 mg L −1 ), and very hard (>180 mg L −1 ).During the prediction phase, the proposed prediction model's parameters are also optimized with the Dwarf Mongoose optimization (DMO) technique.

Pre-processing
The first phase of the suggested framework is to improve the data's quality and get it ready for classification.Preprocessing is typically used to clean up data by removing any extraneous information.The two key stages of the pre-processing techniques used in the proposed framework are as follows: Data normalization [26] and One-hot encoding.

Data normalization
Min-max normalization is a popular method for normalizing data.The algorithm scales and offsets each individual measured reflectance spectrum ( ) X tot l by using the minimum and maximum values of that same individual spectrum.Every component of a vector b that represents a specific value a i is zero, with the exception of the ith component, which is encoded as 1.
For example, if A takes values from the set W e f h , , , = and a e a f a h , , .

Feature extraction
Feature extraction is a method for reducing the size of a dataset by creating more features through the processing of raw visual data.The study highlights the Variational mode decomposition approach (VMD) as a superior choice for feature extraction in water quality classification due to its adaptive nature, noise robustness, ability to capture nonlinear signal characteristics, and application flexibility.The VMD model is highly effective in various applications, including water quality classification, where precise feature extraction is crucial for accurate analysis and decision-making.

Variational mode decomposition (VMD)
The initial step in the VMD approach involves decomposing one-dimensional input data into a specified number of modes.This method considers mode decomposition as an optimization problem.By adding together the I decomposition modes, the data is entirely recreated.
Where, i is denoted as mode index, I is denoted as the overall amount of modes.( ) p n i is denoted as i th mode, which is frequency-modulated with amplitude modulation data expressed as follows; Where, ( ) q n i and ( ) n i f denoted as the time-dependent envelope and the phase of the i th mode.Presumably, the corresponding instantaneous frequency ( ) n i w of the mode is nonnegative and slowly varies about the phase.It is calculable as below equation; The VMD method's decomposition of time series can be stated as a restricted Variational problem with the following objective function: denoted as a function of Dirac, and * denoted as the convolution of y 1 .= -With the use of a quadratic penalty term and a Lagrangian multiplier, the following equation ( 6) can be transformed into a fully constrained optimization problem.
Where, a is denoted as the white noise's range in regularization parameter and ( ) n l denoted as the Lagrangian multiplier.The alternate direction method of multipliers (ADMM) is used to solve the problem (6).This paper just summarizes the final expressions of the ADMM technique.In the frequency domain, the solution of each mode can be represented as: Where, ( ) The results of the most recent and prior iterations of the procedure are indicated by the superscripts n + 1 and n, respectively.The following equation describes the relationship between the center frequency i t 1 w -+ and the power spectrum of each mode, and it is updated whenever ( ) Once all the ( ) w -+ are obtained, the ( ) Where, t is a dual ascent user-defined co-efficient that guarantees accurate signal reconstructio.Iterating a model until it reaches a state of convergence is defined as follows: In this case, the user-defined coefficient (e) is utilized to assess the convergence of the model.The inverse Fourier transform can be used to compute the results in the time domain once the VMD modes in the frequency domain converge.
Where, { } Z denoted as the real part, and if n denoted as the inverse of Fourier transform.The proposed VMD improves and efficient feature extraction.

Feature selection using EX-CoA
During the feature extraction phase, various kinds of feature sets are extracted.However, the classification stage can be time-consuming due to the various features.To address this issue, feature selection is used in this study.The EX-CoA algorithm is chosen for this purpose because it has a comprehensive approach and searches differently than other algorithms.It is effective at identifying significant features and is often used in many studies.The algorithm considers many factors, including the number of features, their relationship, and their relevance to the target variable.Its unique search method makes it a powerful tool for feature selection in different studies.The algorithm is detailed below.

Original coati optimization algorithm (CoA)
The CoA [18] is inspired by the natural behaviors of coatis -attacking and hunting lizards, and escaping from predators.It updates candidate solutions based on these behaviors.

Attacking behavior
Assume that the lizard is located at the position of the best member in the population, half of the coatis climb up trees, while the other half stay on the ground waiting for the lizard to fall.To simulate the positions of coatis on the tree, the following formula can be used: Here, x is denoted as the and y is denoted as the y E 1, 2,....., .

=
The equation for determining the position of a spiny-tailed lizard that has fallen on the ground is as follows:

= <
Here, G x y , is denoted as the y th dimension of the coatis, D x c1 is denoted as the objective function value, k is denoted as the random real number of its interval [ ] 0, 1 , and the location of the best member is represented by the position of the spiny-tailed lizard, which is shown by the iguana in the search space.The lizard's y th dimension number is iguana , y and U is a number chosen at random from the set { } 1, 2 .The lizard's randomly generated position on the ground is represented by iguana , s and its y th dimension is represented by iguana .

. Escaping behavior
Coatis possess an instinct to escape when faced with danger from predators.This survival behavior is utilized in the COA to guide the optimization process.

EX-COA
The following manuscript suggests an extended version of CoA that aims to improve both its global search capability and local exploitation ability.Figure 2 illustrates the algorithmic flowchart, whereas the specific enhancements are mentioned below.
To achieve a more balanced distribution of the population, two approaches are used: circle chaotic mapping and tent mapping.These generate initial populations.The new population is formed by selecting the best individuals from each initial population.To further improve the optimization algorithm, a reverse learning strategy is employed.This involves creating a reverse population using elite individuals from the current population.Finally, excellent individuals are selected from both the reverse and current populations to form the ultimate population.This approach enhances population diversity, improves overall quality, and prevents stagnation of the population near the optimal solution.The expression of this approach is as follows: Here, I is denoted as the value of 0.5, o is denoted as the value 0.2, and ( ) mod is denoted as the operator module.This ensures that the value of G remains between 0 and 1.
Here, k is denoted as the parameter of chaotic sequence, and its values of k 0.499.
Here, G best denotes the position of the optimal population, mo is denoted as upper bands, and no is denoted as lower bands.
By introducing adaptive weighting and the Lévy flight mechanism in the exploration stage, the algorithm's search capability is significantly enhanced, resulting in improved flexibility and convergence speed.The following formula is presented: Here, G x y is denoted as the position of the x th coatis during p iterations, k is denoted as the current iteration number, P is denoted as the maximum number of iterations, L is denoted as the step size control parameter, which is defined as denoted as a path that follows the Levy distribution.By incorporating the cosine and sine update mechanisms during the developmental phase, the algorithm's search space is expanded, and it becomes more directed towards achieving the global optimum.The following formula is provided for your reference: Here, G best denoted as the position of the best individual in the population.The random numbers =k 3 and k 4 are respectively designated as belonging to the ranges of [ ] 0, 2 , p [ ] 0, 2 , and [ ] 0, 1 to which they are applicable.Finally, the EX-CoA algorithm selected the optimal feature for this research.

Classification using StackEL
The research paper utilizes a selected feature as the input to classify the water quality index.The classification model employed in the study is called StackEL, which is a combination of two different structures -Ensemble EfficientNet-B0, B5, and B7, and LSTM architecture.StackEL is an advanced ensemble learning model that utilizes the advantages of diverse base models, including LSTM networks and other sophisticated machine learning algorithms at each layer.This approach enables the model to capture different aspects of the data distribution and enhance the robustness of the classification process.By implementing a stacked ensemble architecture, StackEL offers a powerful and effective approach to water quality index classification, surpassing the performance of other methods.Therefore, it is highly recommended to consider the StackEL classification in this study.The StackEL model is optimized for high water quality index classification performance by finetuning the hyperparameters using a dwarf mongoose optimization algorithm.The research paper further provides a visual representation of the classification model and its architecture in figure 3.By using this advanced model, the aim is to accurately classify the water quality index and provide insights into the quality of water present in the study area.
As an extension of model-averaging ensembles, the ensemble efficient [28] ranks ensemble members according to their contribution to the final forecast.As a result, the multiple output model assigns varying amounts of weight to each classifier dependent on how accurately they predict.The relative importance given to different classifiers is based on how well they perform.The study makes use of the EfficientNet-B0, B5, and B7.The original paper's performance data were used to inform the selection of these architectural designs.The EfficientNet-B0 has the worst performance in the EfficientNet family but still does better than the ResNet-50 and the Inception-v2.The EfficientNet-B5 network is selected because it achieves better results than the other networks currently in use in this area, including DenseNet, ResNet-152, InceptionResNet-v2, and even AmoebaNet-A.Among the SENet, AmoebaNet, EfficientNet, and ResNet families, EfficientNet-B7 is ultimately chosen as the best performer.
Overfitting and initialization sensitivity can negatively impact learning performance, hence there is a lot of interest in adopting mixed ensemble learning algorithms to blend individual earners from heterogeneous and homogenous models.A percentage number between 0 and 1 is calculated by adding up the weights of all the members.The following concepts are officially stated, and m models trained on a collection of n samples have their outputs combined to give a final prediction for any instance Z:  LSTM networks are used to supplement recurrent neural networks (RNNs) [29].The output of one hidden layer is fed back into another hidden layer in an RNN with a directed cycle structure.The signal from the prior period could be used by this structure to identify patterns in time series.Unfortunately, RNN has been plagued by the vanishing gradient problem, leading to subpar performance.Hochreiter and Schmidhuber found a solution to the vanishing gradient issue in LSTM.A gating regulation that consists of an input gate, an output gate, and a forget gate, with cells connected to each element, can be used to update the statuses of the cells.LSTM utilized the subsequent formulas: Where, K k h is denoted as a cell state vector, ( ) d h 1 -is denoted as activation function at a time step h, ( ) e h is denoted as the current input step h, The symbol d is denoted as the activation function at element-wise nonlinear, i G denoted as the input gate, f G denoted as the forgotten gate, o G as the output gate, and ( ) k h denotes the current step of cell state h.The bias and weight matrices are denoted by the letters e and G, respectively.
In this study, a proposed model was developed to classify the water quality index.However, to further improve the accuracy, generalization ability, and robustness of the model, hyperparameter tuning was deemed necessary.Hyperparameter tuning is a process that involves adjusting the parameters of a model to ensure that it is effectively capturing the underlying patterns in the data and making accurate predictions on unseen data.
To achieve optimal parameter tuning, Dwarf Mongoose optimization (DMO) was chosen to enhance the proposed classifier.This optimization technique has shown promising results in various optimization tasks, including those with high-dimensional search spaces, which is often the case in parameter tuning for deep learning models used in water quality index classification.The DMO approach is a population-based optimization technique capable of generating appropriate solutions for optimization problems through an iterative process involving random searches within the problem-solving domain.The method involves three stages: Alpha group, Scout group, and Babysitters.
The alpha group's fitness is calculated using formula (31), and the candidate food position is determined using formula (31) Here, phi is a randomly chosen number between −1 and 1, and the sleeping mound is given in the following equation after each iteration; Equation (34) gives the average value of the discovered sleeping mound.
( ) ms n 37 Then, the algorithm moves on to the scouting phase, where the scout group searches for new sleeping mounds: The Scout expression is given in the following equation; Here, rand is denoted as a random number between [0, 1], the parameter which governs Mongoose group behavior, is progressively relaxed as the number of iterations increases.N Denotes that the Mongoose will relocate to a new sleeping mound based on the direction of the vector p p .
x n x ms x 1 x å = ´, while the babysitters cycle out lower-ranking caretakers.The proposed model utilizes the behavior and adaptations of dwarf mongooses, which are known for their cooperative and adaptive nature, to achieve optimal parameter tuning and improve its performance in classifying the water quality index.
The proposed model uses a StackEL algorithm for classification, which helps predict an accurate water quality index and improves accuracy in less time compared to other classification models.This approach is based on the DMO algorithm, which uses the cooperative behavior of dwarf mongooses to optimize the performance of the model.By leveraging this algorithm, the proposed model can classify the water quality index accurately and efficiently, making it a better choice for water quality classification compared to other models Water quality index classification findings and discussion are presented below.

Results and discussion
In this part, numerous experimental analyses of both current and suggested models are described.This section compares and analyzes numerous metrics connected to a suggested method with both existing and new models.In this study, water quality datasets for Kaggle are utilized to forecast the classification of the WQI.For water quality datasets, several performance metrics are generated, including precision, recall, accuracy, mean absolute error (MAE), mean square error (MSE), root mean square error (RMSE), and mean absolute percentage error (MAPE).Using an ensemble learning approach, accuracy is calculated and compared with several current models, including Deep convolution neural network (DCNN), EfficientNet-B0, EfficientNet-B5, EfficientNet-B7, LSTM Bi-LSTM, and the suggested model.In this section, numerous models are briefly explained before these measures are assessed and compared with them.

Dataset description
The water_potability.csv file includes data on 3276 unique bodies of water and their quality parameters.Values for pH, Hardness, Solids, Chloramines, Sulfate, Conductivity, Organic Carbon, Trihalomethanes, Turbidity, Portability, and many more are all indicators of water quality.The suggested model makes use of the Kaggle dataset for water quality, and the corresponding download link is https://www.kaggle.com/datasets/adityakadiwal/water-potability.

Performance metrics
Accuracy, Precision, Recall, MAE, MSE, RMSE, and MAPE are only a few of the performance metrics used to assess the proposed dimensionality reduction approach.The mathematical formula for these performance indicators is included in the next section.

Accuracy
Accuracy is defined as the proportion of correct predictions to total forecasts.

( ) ACC GS GI GI KI KS GS
Where, GI denotes the number of true positives, KI false positives, GS false negatives, and KS true negatives.6 shows the MAE and MSE for different models.These measures give us an idea of how big and how spread out the errors are.For example, the Bi-LSTM model has an MAE of 0.55 and an MSE of 0.68.This means its predictions are quite accurate and precise.The LSTM model has an MAE of 0.74 and an MSE of 0.81.The EfficientNet-B7 has an MAE of 0.84 and an MSE of 0.89.The EfficientNet-B5 model has a remarkably high level of accuracy, with an MAE and MSE of both 0.01.In contrast, the EfficientNet-B0 model has an MAE of 1.1 and an MSE of 1.11, which is much higher than the other models.The DCNN model is not very accurate for regression tasks, with an MAE of 0.0122 and an MSE of 1.221.The suggested model has an MAE and MSE of    performance.As a result, the proposed model has achieved lower error rates.Figure 8 shows the Time complexity for the proposed and various existing models.
Figure 8 analyses the time complexity of the proposed and various existing models.The computational effort and water quality detection method are the two main metrics used to evaluate the effectiveness of the proposed model.The difficulties that occur during the process are due to the time complexity.The overall computational time value of the proposed classifier is 12.74%, while the corresponding values for DCNN, EfficientNet-B0, EfficientNet-B5, EfficientNet-B7, LSTM, and Bi-LSTM are 23.5%, 22.19%, 21.23%, 20.56%, 19.83, and 18.01%, respectively.When compared to the previous method, it can be observed that the proposed model has achieved a significantly lower computational time.This can be attributed to the fact that the proposed model selects only the most relevant features, thereby reducing the overall computational complexity.Figure 9 describes the proposed method of training and testing accuracy.

Conclusion
In this study, a StackEL approach is used for classification to increase the system's effectiveness and accuracy.This classification technique creates an effective system for categorizing water quality.This classification is accomplished through several steps, including the first step, the raw input data is pre-processing to rescale the input data using data normalization, and one-hot encoding from the pre-processing data after extracted using VMD, and the optimal features are selected using EX-CoA.Finally, the classification using the StackEL technique is increased to accurate classification values.To classify images using the water quality dataset from Kaggle, various performance metrics are measured and compared to existing and proposed models.The proposed model can obtain values of training loss of 0.03%, testing loss of 0.07%, training accuracy of 0.98%, and testing accuracy of 0.98%.The overall computational time value of the proposed classifier is 12.74%.The proposed model gained a very low computational time compared to the previous method.The proposed model parameter accuracy 98.85%, precision 98.56%, recall 99.12%, MAE 0.39%, MSE 0.49%, RMSE 0.59%, and MAPE 0.49% are also measured in the water quality dataset.The proposed model was capable of accurately classifying the water quality index.However, the model faced two minor issues, including its complexity and limited features.Despite these problems, the proposed model was still able to classify the water quality index accurately and more efficiently than other water quality classification methods.
The proposed work can be extended further in the future by developing a more effective model that delivers better reliability.However, there are a couple of issues that need to be addressed.Firstly, the model complexity problem arises due to the use of multiple layers of LSTM units alongside other neural network components, such as convolutional layers or attention mechanisms.This stacking can increase the overall complexity of the model, which can be mitigated by employing a single deep-learning model in the classification process.Secondly, the VMD model extracts limited features, which fails to capture the full range of relevant information.To overcome this limitation, multiple feature extraction techniques can be combined to provide a more comprehensive representation of the data.
c2 is denoted as the updated position of the x th long-nosed coatis; G x y c , 2 is denoted as the y th dimension of the coatis; D x c2 is denoted as the objective function value of the coatis; k is denoted as the random number in the interval [ ] 0, 1 ; d is denoted as the iteration number; mo y local and no y local is denoted as the lower and upper bounds of the y th decision variable respectively.A new CoA algorithm has been proposed to address the limitations of the existing CoA algorithm.The proposed algorithm aims to overcome issues such as low convergence precision, slow convergence speed, and susceptibility to falling into local optima.

-
apply to an experiment with the outcomes 0 and 1 and their associated probabilities , ,..... .it cannot be defined a density on , ,..... , i 1 2b b b but it may be defined one on , , ..... model with parameter vector , a the probability density at b is:

Figure 4 .
Figure 4. (a) and (b): Performance comparison of the proposed and existing models.

Figure 5 .
Figure 5. Performance comparison of the proposed and existing models.

Figures 9 (
a), (b) shows the training and testing accuracy for the existing and proposed model.During iterations of epoch values at 300 in the training set, the existing model can obtain values of 0.80, 0.82, 0.85, 0.90, 0.93, and 0.95; thus, the suggested method can attain a lower training loss rate than existing models because it trained data for many iterations to increase the loss rate.During iterations of epoch values at 300 in the testing set, the existing model can obtain values of 0.18, 0.17, 0.16, 0.12, 0.10, and 0.09; the proposed model can obtain values of 0.07.Thus, the suggested method can attain a lower testing loss than existing models because it tests

Figure 8 .
Figure 8. Analysis of computational time.
data for many iterations to improve testing loss.Figures10(a), (b) Overall, the proposed achieves low training and testing loss to the existing model.Figures 10(a), and (b) show the training and testing loss for the existing and proposed model.During iterations of epoch values at 300 in the training set, the existing model can obtain values of 0.15, 0.13, 0.12, 0.11, 0.08, and 0.06; the proposed model can obtain values of 0.03.Thus, the suggested method can attain a lower training loss rate than existing models because it trained data for many iterations to increase the loss rate.During iterations of epoch values at 300 in the testing set, the existing model can obtain values of 0.18, 0.17, 0.16, 0.12, 0.10, and 0.09; the proposed model can obtain values of 0.07.Thus, the suggested method can attain a lower testing loss than existing models because it tests data for many iterations to improve testing loss.Figures 10(a), (b) Overall, the proposed achieves low training and testing loss to the existing model.

Table 1 .
Examination of current classification techniques.
A large amount of training dataset RMSE, and MAPE Khullar et al [23] DLBL-WQA To predict water quality factors in the Yamuna River in India Yamuna River in India Higher computational complexity MSE, RMSE, MAE, and MAPE Chen et al [24] AEABC-BPNN To predict the long-term water quality index Luoyang River Basin Overfitting issue PICP, MAPE, and MSE The recall parameter is employed by the ML model to detect genuine positive instances accurately.It also assesses the precision and ability to detect pertinent facts.It was observed that the proposed WQI classification model demonstrated a significant improvement in recall rates compared to the existing models.The proposed model was able to correctly identify 99.12% of the actual positive cases, which is a remarkable improvement over the previous method.One of the reasons why the proposed model outperformed the existing models is that the existing models often made incorrect predictions by identifying actual positive cases as negative and vice versa.The proposed WQI classification model, on the other hand, was able to correctly identify the actual positive and negative values, leading to improved recall rates.Figures6(a), and (b) show the performance of MAE and MSE performance represented in the box plot.WQI classification models are used to predict the value of a dependent variable based on one or more independent variables.The goal of training a WQI classification model is to make accurate predictions.Two ways to measure accuracy are MAE and MSE.Low values for these measures mean the model is better.A box plot chart in figure