 Prediction of River Water Quality Based on Artificial Neural Network

Danial Mustaqim Azmi<sup>1</sup>, Norlina Mohd Sabri\[1\]<sup>2\*</sup>, Nik Marsyahariani Nik Daud<sup>3</sup>, Nor Azila Awang Abu Bakar <sup>4</sup>

*<sup>1,2,3,4</sup>College of Computing, Informatics and Mathematics, Universiti Teknologi MARA Cawangan Terengganu*

*Kampus Kuala Terengganu, 21080 Kuala Terengganu, Terengganu, Malaysia*

<table>
<tbody>
<tr class="odd">
<td>ARTICLE INFO</td>
<td></td>
<td>ABSTRACT</td>
</tr>
<tr class="even">
<td><p><em>Article history:</em></p>
<p>Received: 31 January 2024</p>
<p>Revised: 13 February 2024</p>
<p>Accepted: 14 February 2024</p>
<p>Online first: 1 March 2024</p>
<p>Published 1 March 2024</p></td>
<td></td>
<td>In machine learning, a prediction is an assumption that may be supported by historical data and is often used in various fields. It may be used to forecast factors like river water quality, which is a major source of life, particularly for human. The health of the river is impacted by the river’s diminishing water quality, increasing the danger to human health and making it more difficult to ensure the sustainable production of drinking water. Water contamination may be a result of civilization and the economy developing so quickly. This research looks at how the Artificial Neural Network (ANN) algorithm predicts the Water Quality Index that will aid environmental department and consumers. Besides that, this study also aims to create an ANN-based water quality index prediction system that is effective at managing noisy data. Furthermore, the constructed prototype's ability to accurately forecast water quality will be assessed. The water quality forecast method is based on Selangor's three main rivers, which are Sungai Buloh, Langat, and Kuala Selangor and takes into account variables such the biological oxygen demand (BOD), dissolve oxygen (DO), and more. The performance metric used in the study is the calculation of the accuracy for factors such as the number of neurons in the hidden layer, the epoch number, the split data ratio and the learning rate. The result has shown that the ANN model has produced good and acceptable performance with 88.44% accuracy. In future, the ANN model will be improved with more data for its training and the performance will be compared with other prediction algorithms.</td>
</tr>
<tr class="odd">
<td><p><em>Keywords:</em></p>
<p>Prediction</p>
<p>River</p>
<p>Water Quality</p>
<p>ANN</p>
<p><em>DOI:</em></p>
<p>10.24191/jcrinn.v9i1</p></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>

# 1\. INTRODUCTION

Rivers are regarded as one of the most important sources of water for agricultural demands, industrial needs, and other applications (Najah et al., 2019). Water quality is the state or condition of water that takes into consideration the physical, chemical, and biological characteristics of the water. The Water Quality Index is a metric used to determine whether the overall water quality in a certain area is contaminated or not. In addition, Dissolve Oxygen (DO) and Chemical Oxygen Demand (CODMn) are also significant metrics for assessing water quality (Bi et al., 2021). However, the fast expansion of civilization and the economy, including urbanization, industry, and agricultural output, may have polluted the river (Xia et al., 2022). Furthermore, the river systems are especially susceptible to the negative impacts of environmental contamination because of their dynamic nature and ease of accessibility for garbage dumping. For instance, the river that is close to an industrial activity will be at a higher risk of being exposed to contaminants discharged by negligent factories. According to Bi et al. (2021), in a real-world water environment, having water quality management and its forecast is crucial to facilitate many parties. The prediction of river water quality system will help environmental department and consumers to forecast the condition of the river water in term of its state, as well as the classification of its condition. Besides that, the system could assist the environmental agency in determining whether a river could serve as a primary source for the processed water for consumers. This technology could reduce the amount of time needed for the environmental agency to get the categorization of the river water quality. It will improve their effectiveness in keeping an eye on all the major rivers in a given area that serve as a major source of food for local residents.

According to Ho et al. (2019), a crucial first step toward improving river water quality management is the creation of water quality prediction models. Due to the lengthy study of the water quality characteristics, in addition to the significant work and time required for gathering and analyzing water samples, the traditional method for calculating WQI (Water Quality Index) is always accompanied by inaccuracies (Ho et al., 2019; Aldrees et al., 2022). Besides that, the present computations of the water quality index (WQI), which include sub-index calculations like BOD and COD, can occasionally be exceedingly difficult and time-consuming (Leong et al., 2019; Aldrees et al., 2022). Due to extensive data collection on river pollution and ambiguous water quality parameter results, measuring river water quality may also be challenging (Zamri et al., 2022). Therefore, the necessity for the river water quality forecast system arises in order to reduce errors. In other research, any site's classification of the water quality can employ prediction to get findings as quickly as feasible and with the fewest parameters (Sattari et al., 2021). Large water quality dataset might be difficult to examine, so, it is necessary to have a prediction system that can predict river water quality, especially when using a high number of samples.

Based on the importance of the river water quality prediction, this research has suggested utilizing the Artificial Neural Network (ANN) method to forecast river water quality. The objective of the research is to explore the capability of ANN for the river water quality prediction. The ANN makes very accurate predictions and enhances the performance of other algorithms (Azimi et al., 2019; Bi et al., 2021; Dawood et al., 2021; Xia et al., 2022; Nayak et al., 2023). Additionally, compared to other approaches, it provided the most accurate results in term of accuracy (Ghosh et al., 2023). Previous studies in a particular subject, have shown that ANN has a lot of promise (Olabi et al., 2023). When a large number of samples are involved, the ANN technique is a very successful algorithm for river water quality prediction. Other algorithms' shortcomings are solved by using this method (Nayak et al., 2023). ANN also can learn complex relationship between complex input and output parameters due to the benefits over the model options. Therefore, ANN has been chosen to be investigated for the prediction of river water quality in this study. The paper is organized into five main sections which are the Introduction, Literature Review, Methodology, Results and Finding and finally the Conclusion.

# 2\. literature review

This section provides a brief review on the prediction of the river water quality using ANN techniques and the brief description of the ANN method.

## 2.1 Prediction of River Water Quality

##  There are many machine learning techniques that have been utilized for the river water quality predictions. However, ANN has been implemented by many researchers in solving the water quality prediction problems. The good performance of ANN has drawn many researchers to explore its capability in various predcition problems.

##  A study in India has been utilizing ANN for the prediction of the Godavari River Basin water quality (Satish et al., 2024) . The results have shown that the stacked ANN has performed better and it could help in the environmental management and monitoring of rivers. Meanwhile, a study in China has combined ANN and PSO in order to develop a better prediction model. The hybrid technique has utilized the principal component analysis in order to reduce the data dimensionality and eliminate the complexity between water quality parameters (Guo & Fu, 2023).

## Babu et al. (2023) has implemented the Long Short Term Memory(LSTM) for the simulation of the water quality values. The model is expected to be able to accurately predict the water quality values even when the data are scarce. In this study, LSTM has generated the highest accuracy compared to other algorithms.

## A study by Murivhami et al. (2023) has implemented ANN for the prediction of water quality index (WQI). The water quality prediction could help in the monitoring and reducing the water pollution. The proposed ANN model has also generated good prediction performance.

Nayak et al. (2023) has conducted a research to develop a river forecasting system for the Godavari in India. The study focuses on using ANN, with the combination of other techniques to improve the performance and reduce the WQI limitations. Levenberg Marquardt (LM) and Scaled Conjugate Gradient (SCG) are the two other techniques that have been utilized in conjunction with ANN. The final result demonstrated that ANN could accurately estimate the water quality at the Godavari River.

According to a study by Bi et al. (2021), the suggested approach has outperformed all other models when used to forecast time series data on water quality. This study uses artificial neural networks and the Savitzky-Golay filter. In addition, a study has been conducted in Wuhan, China to evaluate the standard of the city's drinking water supply using ANN. There were 863 samples of tap water and 137 samples of finished water were utilised in the study. The result has revealed that the quality of Wuhan's municipal drinking water was in compliance with the national hygiene standards (Xia et al., 2022).

Due to pollutant penetration into water pipelines, leaching, disinfection byproducts, chemical or microbiological permeation and pollution, the pure water could easily become contaminated. In a study, Dawood et al. (2022) has implemented ANN to forecast the quality of the water and performed the risk analysis. Using ANN, a team of academics in Korea has conducted a study to improve the prediction accuracy of the water quality in a large lake using the combined application of a numerical model. The result achieved while utilising the ANN method has exhibited a good performance (Kim et al., 2021).

Based on the strong capabilities of ANN and its great tolerance for data scarcity, this study has chosen ANN for the Selangor main rivers’ water quality prediction. Another exploration of this algorithm in the river water quality forecast problem could further strengthen its prediction capability.

Table . Summary of the Recent Water Quality Prediction

| No | Technique/Algorithm                                                                     | Objective                                                                                                                                   | Problem                                                                                                                                        | Result                                                                                                                 | Reference                |
| -- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| 1  | ANN and ML models                                                                       | To predict the Godavari River Basin water quality                                                                                           | Prediction inputs are critical to the environmental management and monitoring of rivers.                                                       | ANN with stacked ML models performed better (R<sup>2</sup>=0.91)                                                       | (Satish et al., 2024)    |
| 2  | ANN                                                                                     | To reduce water pollution                                                                                                                   | Ensure compliance with drinking water and wastewater treatment standards                                                                       | Exhibit good performance (R<sup>2</sup>=0.99)                                                                          | (Murivhami et al., 2023) |
| 3  | ANN, PSO                                                                                | To improve the accuracy of dissolved oxygen prediction                                                                                      | Complex correlation and nonlinearity between various parameters of river water quality greatly affect the accuracy of water quality prediction | Hybrid ANN and PSO performed better (RMSE=0.146)                                                                       | (Guo & Fu, 2023)         |
| 4  | LSTM, RNN, ARIMA                                                                        | To accurately simulate the water quality                                                                                                    | Forecasting water quality has become essential in reducing water pollution                                                                     | LTSM performed the best with 93.5% accuracy                                                                            | (Babu et al., 2023)      |
| 5  | ANN (Levenberg Marquadt algorithm).                                                     | To overcome the limitation of conventional WQIs.                                                                                            | Water quality assessment is a need and is crucial for maintaining human health.                                                                | The Artificial Neural Network model using Levenberg Marquadt algorithm have very high accuracy.                        | (Nayak et al., 2023)     |
| 6  | ANN                                                                                     | To assess the spatial-temporal distribution of municipal drinking quality across time.                                                      | Rapid growth caused the water system and biological environment to deteriorate.                                                                | Artificial Neural Network predict water quality with high accuracy.                                                    | (Xia et al., 2022)       |
| 7  | Encoder-Decoder Neural Network with long-short term memory and a Savitzky-Golay filter. | To ensure efficient water resource management.                                                                                              | People’s worries about the severe contamination of the aquatic environment have grown.                                                         | Encoder-Decoder neural network with long-short term memory and Savitzky-Golay filter provide more accurate prediction. | (Bi et al., 2021)        |
| 8  | ANN and risk analysis technique                                                         | To further explain, via the use of ANN and risk analysis technique, the effect of aforementioned elements on the quality of portable water. | The distribution stage quality failure will be delivered to the public.                                                                        | The use of ANN optimizes the prediction result.                                                                        | (Dawood et al., 2021)    |
| 9  | ANN with Environmental fluid dynamic code.                                              | To improve the prediction accuracy of water quality in a large lake                                                                         | Limited field data can often be the major cause of errors in water quality prediction                                                          | The Artificial Neural Network showed more accurate result                                                              | (Kim et al., 2021)       |

## 2.2 Artificial Neural Network

An Artificial Neural Network (ANN) is one of the machine learning and Artificial Intelligence techniques that are often used (Juan & Valdecantos, 2022). Besides that, ANN is a universal approximator in mathematics, demonstrated to be very good at modelling non-linear problems. ANN is used to solve a variety of complex problems such as pattern recognition, classification, and control (Ozcalici & Bumin, 2022). It is a computer model made up of many processing components that accept input and produce output in accordance with a specified activation function.

ANN was developed based on the research on the nervous system and the brain (Pantic et al., 2023). Although they employ a condensed set of biological brain system ideas, these networks mimic biological neural networks. ANN models mimic the brain and nervous system's electrical activity. The input, hidden, and output layers are the three layers that make up an ANN (Lu et al., 2022). Each layer has a number of neurons that are used to calculate the activation function as well as the weight and bias values for the layer (Ying et al., 2023). Weight and bias values can be initialized at random. ANN consist of two training rules which are feedforward and backward propagation (Afandi et al., 2021). The basic flowchart of ANN is shown in Fig. 1. The first stage in the ANN process is to initialize the weight, bias, and neuron values for each layer. At initial, they will be randomly initialized, but afterwards, the number of neurons can be adjusted to discover the model's optimal performance. The model will then determine the value of the activation function, which includes the weight, bias, and value of each neuron. It will begin with the input to the hidden layer and move on to the hidden to output layer after that. The model then chooses the outcome depending on the output neuron that have been calculated after the computation was done in the last layer, which is the output layer.

![](65d4394b2b1c0_media/media/image1.jpg)

Fig. 1. Artificial Neural Network’s Flowchart

# 3\. methodology

## 3.1 Experimental Data

In this study, the data were collected from the Selangor Environmental Department. There were 683 data that had been collected, which represented the monthly data starting from January 2017 to December 2022. Due to its water quality, the water supplied frequently draws numerous complaints from customers, which involves Selangor's three main rivers. The rivers are Sungai Buloh, Langat and Kuala Selangor rivers. In order to categorize future behavior for a specific river, the dataset has been utilized throughout the model's training and testing phases. This will allow it to learn from previous behavior of river water characteristics. The characteristics or elements that are taken into account are shown in Table 2. The elements can determine whether or not the supplied river samples were contaminated. The attributes for the ANN are the values of Biological Oxygen Demand (BOD), Dissolve Oxygen (DO), Sulfate, PH, Nitrite, Conductivity, Nitrate, Phosphate and Water Quality Index (Murivhami et al., 2023; Guo & Fu, 2023) . All these attributes are in the continuous numerical data type. There were 683 rows of data and 9 total characteristics involved in this study. The new input data that the user will enter will be used to compute the classification's outcome. The result will display the various water quality classes, which is ranged from 1 to 5. In this study, the lower the number of the class, the better the quality of the water will be. In addition, it will display the level of the pollution in the river's water, which are clean, polluted or slightly polluted based on the results.

Table 2. Attributes of the Prediciton and the Output

| Prediction Attributes | Biological Oxygen Demand (BOD)                   |
| --------------------- | ------------------------------------------------ |
|                       | Dissolve Oxygen (DO)                             |
|                       | Sulfate                                          |
|                       | PH                                               |
|                       | Nitrite                                          |
|                       | Conductivity                                     |
|                       | Nitrate                                          |
|                       | Phosphate                                        |
|                       | Water Quality Index                              |
| Classification Output | Water Status: Clean, Polluted, Slightly Polluted |
|                       | Water Class: I, II, III, IV, V                   |

## 3.2 System Architecture 

The system architecture of the river water quality prediction system is depicted in Fig. 2. It is consisted of three basic sections, which are the data collection and preparation, user interface and the system’s engine. The raw data were collected from the Selangor's Environment Department. A number of rivers, including those in Kuala Selangor, Sungai Buloh and Langat were selected to make up the sample of data. Due to the exposure of industrial activities and other factors, these rivers have been the subject of several consumer complaints in recent years. The raw data had gone through data cleaning in order to replace the missing values, eliminate unnecessary characteristics and other tasks. Then the dataset were trained and tested using the ANN algorithm. There were 3 percentage splits that had been tested in order to avoid the overfitting of the algorithm. The algorithm was also fine tuned to obtained the best parameters such as the best number of neuron, epoch and also the learning rate. The best split had been chosen for the ANN model for this research. After the testing and training, the ANN model was ready to be deployed for the river water quality prediction. In this system, the user has to enter the 9 value of attributes, which are the dissolve oxygen, biological oxygen demand, sulfate, PH, nitrite, conductivity, nitrate, phosphate and water quality index. The ANN model will process the input data in the backend, which involves the initialization of input, weight, hidden neurons and the calculation of the sigmoid function. The output will be the the river water quality status, which is categorized into clean, polluted or slightly polluted. The river water class which is ranged from 1 to 5 will also be displayed with the river water quality result.

![](65d4394b2b1c0_media/media/image2.jpg)

Fig. 2. System Architecture

The ANN structure employed in this study is depicted in Fig. 3. There are 9, 16, and 2 neurons in the input, hidden and output layers respectively. The type of ANN used is the Feed-Forward Back Propagation Network. The activation function used in this study is the sigmoid function. Since the sigmoid function involves binary outputs between 0 and 1, it would be simple to understand which class the output belongs to in the forecast. Additionally, it is smooth and differentiable everywhere, which contributes to its stability and continuous model parameter updates throughout training.

![](65d4394b2b1c0_media/media/image3.jpg)

Fig. 3. ANN Structure

## 3.3 Model Development Flowchart

The model's development flowchart, which is represented in Fig. 4, begins with the gathering of data through Selangor's environmental department, which includes 683 rows of data from 2017 to 2021. The data is then preprocessed in order to increase its usefulness, which includes actions such as replacing missing values and uninteresting attributes. The data will subsequently be prepared for use in the ANN's training and testing phases. The setting of weight, bias, and the number of neurons for each layer, especially the hidden layer is the first step in the ANN algorithm. This is due to the fact that the values will be required to compute the values from each neuron until the final neuron in the output layer. The output neuron's value represents the prediction's value. The performance of the ANN model will be assessed in order to decide if any parameter adjustments are necessary to improve the algoritm’s performance.

![](65d4394b2b1c0_media/media/image4.jpg)

Fig. 4. Model Development Flowchart

# 4\. RESULTS AND FINDING

In order to improve the performance of the ANN model, performance evaluation takes into account a number of factors. Parameter tuning is the procedure where the parameter will be adjusted to get the optimum accuracy. The number of neurons in the hidden layer, the split data ratio, the epoch number and the learning rate were among the parameters that were tuned. In addition, this section displays the system's user interface developed for the ANN model.

## 4.1 Number of Neuron in Hidden Layer

The hidden layer's neuron count is crucial and it is not constrained to a certain range. However, differing neuron values in the hidden layer might result in varying degrees of accuracy. The higher number of neurons in the hidden layer does not always indicate the effective it will be. Determining a specific range of neurons in the hidden layer is necessary for this reason. Based on Table 3 and Fig. 5, the model's accuracy is assessed using three alternative numbers of neurons. The accuracy obtained with the first set of 8 neurons is 87.16%; 88.02% with 16 neurons and 84.98% with 32 neurons. Thus, the 16 number neurons were chosen for the ANN model as it generated the maximum number of accuracy.

Table 3. Evaluation on Number of Neuron

| Number of neuron | Accuracy | Loss  |
| ---------------- | -------- | ----- |
| 8                | 87.16%   | 0.088 |
| 16               | 88.02%   | 0.082 |
| 32               | 84.98%   | 0.107 |

![](65d4394b2b1c0_media/media/image5.JPG)

Fig. 5. Number of Neuron Evaluation Graph

## 4.2 Split Data Ratio

The split data ratio divides the dataset into two subsets, the training dataset and the testing dataset. While the testing dataset will be utilized throughout the ANN's testing phase, the training dataset will be used during training phase. As an illustration, if the split data ratio was 60:40, then 60% of the dataset would be designated as training data and the remaining 40% as testing data. Table 4 and Fig. 6 displays the three splits for the data split ratio parameter. The accuracy for the split data ratios were 88.44%, 85.48%, and 86.75% respectively for the 70:30, 80:20, and 90:10 splits. Based on the table, the split ratio of 70:30 has delivered the best performance with an accuracy of 88.44% out of the three split ratios. In this study, it is found that more training data did not necessarily produced better results.

Table 4. Evaluation on Split Data Ratio

| Split ratio | Accuracy | Loss  |
| ----------- | -------- | ----- |
| 70:30       | 88.44%   | 0.081 |
| 80:20       | 85.48%   | 0.104 |
| 90:10       | 86.75%   | 0.096 |

![](65d4394b2b1c0_media/media/image6.JPG)

Fig. 6. Split Data Ratio Performance Graph

## 4.3 Epoch Number

Epoch, which refers to how many times the dataset will be utilized in the ANN model, is the following parameter. In the context of machine learning, this refers to how frequently the model will draw knowledge from datasets or previous values. The performance of the model may be impacted by the number of epochs. As indicated in Table 5 and Fig. 7, the value of the epoch was also examined to determine how well it performed in terms of accuracy. The range of tested epochs is 100 to 1000, with 100 as the beginning point and 50 as the increment. There had been 19 different epoch values that were assessed. The maximum accuracy of 88.37% was obtained using the 700 and 1000 epoch values out of all 19 epoch values. Therefore, the comparison of loss for both values was assessed in order to decide which epoch should be chosen. According to the loss, the 700 epoch had a lower loss than the 1000 epoch, with 0.086 instead of 0.095.

Table 5. Evaluation on Epoch Number

| Epoch (+50) | Accuracy | Loss  |
| ----------- | -------- | ----- |
| 100         | 69.41%   | 0.249 |
| 150         | 77.96%   | 0.174 |
| 200         | 76.14%   | 0.172 |
| 250         | 88.03%   | 0.090 |
| 300         | 87.62%   | 0.101 |
| 350         | 87.52%   | 0.097 |
| 400         | 84.38%   | 0.115 |
| 450         | 84.60%   | 0.114 |
| 500         | 86.11%   | 0.091 |
| 550         | 88.11%   | 0.093 |
| 600         | 87.05%   | 0.104 |
| 650         | 87.50%   | 0.096 |
| 700         | 88.37%   | 0.086 |
| 750         | 86.40%   | 0.095 |
| 800         | 84.87%   | 0.117 |
| 850         | 86.32%   | 0.096 |
| 900         | 85.74%   | 0.116 |
| 950         | 87.09%   | 0.089 |
| 1000        | 88.37%   | 0.095 |

![](65d4394b2b1c0_media/media/image7.JPG)

Fig. 7. Epoch Number Performance’s Evaluation Graph

## 4.4 Learning Rate

When weight and bias are adjusted in an ANN's backward propagation, learning rate is a parameter that is taken into consideration. This is due to the fact that weight and bias values must first be changed to match the model because they are initially created at random. As indicated in Table 6 and Fig. 8, similar to other parameters, learning rate has been assessed with values ranging from 0.1 to 1.0 with a 0.1 increment. Thus, there will be 10 distinct learning rate values. Based on all possible learning rate values, 0.1 provided the best accuracy (88.11%), while 0.4 provided the lowest accuracy (74.27%). Therefore, 0.1 will be used in the ANN model.

Table 6. Evaluation on Learning Rare

| Learning rate | Accuracy | Loss  |
| ------------- | -------- | ----- |
| 0.1           | 88.11%   | 0.091 |
| 0.2           | 82.81%   | 0.129 |
| 0.3           | 82.47%   | 0.142 |
| 0.4           | 74.27%   | 0.230 |
| 0.5           | 78.51%   | 0.210 |
| 0.6           | 82.73%   | 0.171 |
| 0.7           | 79.22%   | 0.189 |
| 0.8           | 86.79%   | 0.131 |
| 0.9           | 77.04%   | 0.214 |
| 1.0           | 84.72%   | 0.151 |

![](65d4394b2b1c0_media/media/image8.JPG)

Fig. 8. Learning Rate Performance’s Evaluation Graph

## 4.5 Prediction Model Interface

The system's user interface is divided into three sections which are the About page, Prediction page, and a performance assessment page. The major objective of the system, which was to assess and examine the effectiveness of ANN in forecasting river water quality, is described in the About page, as seen in Fig. 9.

![](65d4394b2b1c0_media/media/image9.png)

Fig.9. About Page

The prediction of the river water quality is in the second page, as shown in Fig. 10. The user must provide the input value that corresponds to the attribute values. The output will then be presented in the result area once the user clicks the predict button to see the outcome of the prediction. In addition, the user can refer to the output reference included in the reference section.

![](65d4394b2b1c0_media/media/image10.png)

Fig. 10. Prediction Page

The performance assessment page is the last page, as illustrated in Fig. 11. It has buttons that provide information on the ANN's structure and parameter comparisons in the form of graphs and tables.

![](65d4394b2b1c0_media/media/image11.png)

Fig. 11. System Performance Page

# 5\. conclusion

***In this research, the ANN model has successfully predicted the river water quality with an acceptable accuracy of*** 88.44%. The accuracy was obtained using the following parameters; 16 hidden neurons, a 70:30 split of the data, 700 epochs and a 0.1 learning rate. The siginificance of the research is that the prediction of the river water quality system could help the environmental department and consumers to forecast the condition of the river water in term of its state, as well as the classification of its condition. Besides that, the system could assist the environmental agency in determining whether a river could serve as a primary source for the processed water for consumers. This prediction could reduce the amount of time needed for the environmental agency to get the categorization of the river water quality. It will improve their effectiveness in keeping an eye on all the major rivers in a given area that serve as a major source of food for local residents. The future work are to add more data for the training and testing of the algorithm and to compare its performance with other prediction algorithms such as the Support Vector Machine and Random Forest.

# 6\. Acknowledgements

The authors would like to express gratitudes to Universiti Teknologi MARA Cawangan Terengganu for the support given in the advancement of the research in the university.

# 7\. Conflict of interest statement

There are no conflict of interests in the research.

# 8\. Authors’ contributions

Danial Mustaqim Azmi carried out the research and wrote the first draft. Norlina Mohd Sabri supervised the project and edited the article. Nik Marsyahariani Nik Daud and Nor Azila Awang Abu Bakar also helped in editing, formatting and finalized the article.

# 9\. References

Bi, J., Lin, Y., Dong, Q., Yuan, H., & Zhou, M. (2021, September). Large- scale water quality prediction with integrated deep neural network. *Information Sciences*, *571*, 191–205. https://doi.org/10.1016/j.ins.2021.04.057

Azimi, S., Azhdary Moghaddam, M., & Hashemi Monfared, S. A. (2019). Prediction of annual drinking water quality reduction based on Groundwater Resource Index using the artificial neural network and fuzzy clustering. *Journal of Contaminant Hydrology*, *220*, 6–17. https://doi.org/10.1016/j.jconhyd.2018.10.010 

Nayak, J. G., Patil, L., & Patki, V. K. (2023). Artificial neural network based water quality index (WQI) for river Godavari (India). *Materials Today: Proceedings*, *81*, 212–220. https://doi.org/10.1016/j.matpr.2021.03.100

Xia, L., Han, Q., Shang, L., Wang, Y., Li, X., Zhang, J., Yang, T., Liu, J., & Liu, L. (2022). Quality assessment and prediction of municipal drinking water using water quality index and artificial neural network: A case study of Wuhan, central China, from 2013 to 2019. *Science of the Total Environment*, *844*. https://doi.org/10.1016/j.scitotenv.2022.157096

Dawood, T., Elwakil, E., Novoa, H. M., & Gárate Delgado, J. F. (2021). Toward urban sustainability and clean potable water: Prediction of water quality via artificial neural networks. *Journal of Cleaner Production*, *291*. https://doi.org/10.1016/j.jclepro.2020.125266

Najah Ahmed, A., Binti Othman, F., Abdulmohsin Afan, H., Khaleel Ibrahim, R., Ming Fai, C., Shabbir Hossain, M., Ehteram, M., & Elshafie, A. (2019, November). Machine learning methods for better water quality prediction. *Journal of Hydrology*, *578*, 124084. https://doi.org/10.1016/j.jhydrol.2019.124084

Ho, J. Y., Afan, H. A., El-Shafie, A. H., Koting, S. B., Mohd, N. S., Jaafar, W. Z. B., Lai Sai, H., Malek, M. A., Ahmed, A. N., Mohtar, W. H. M. W., Elshorbagy, A., & El-Shafie, A. (2019). Towards a time and cost effective approach to water quality index class prediction. *Journal of Hydrology*, *575*, 148–165. https://doi.org/10.1016/j.jhydrol.2019.05.016

Pantic, I., Paunovic, J., Cumic, J., Valjarevic, S., Petroianu, G. A., & Corridon, P. R. (2023, January). Artificial neural networks in contemporary toxicology research. *Chemico-Biological Interactions*, *369*, 110269. https://doi.org/10.1016/j.cbi.2022.110269

Sattari, M. T., Feizi, H., Colak, M. S., Ozturk, A., Ozturk, F., & Apaydin, H. (2021). Surface water quality classification using data mining approaches: Irrigation along the Aladag River\*. *Irrigation and Drainage*, *70*(5), 1227–1246. https://doi.org/10.1002/ird.2594

Ghosh, A., Mukherjee, J., & Chakravorty, N. (2023, February). A low-cost test for anemia using an Artificial Neural Network. *Computer Methods and Programs in Biomedicine*, *229*, 107251. https://doi.org/10.1016/j.cmpb.2022.107251

Ying Ying Tang, D., Wayne Chew, K., Ting, H. Y., Sia, Y. H., Gentili, F. G., Park, Y. K., Banat, F., Culaba, A. B., Ma, Z., & Loke Show, P. (2023, February). Application of regression and artificial neural network analysis of Red-Green-Blue image components in prediction of chlorophyll content in microalgae. *Bioresource Technology*, *370*, 128503. https://doi.org/10.1016/j.biortech.2022.128503

Olabi, A., Abdelkareem, M. A., Semeraro, C., Radi, M. A., Rezk, H., Muhaisen, O., Al-Isawi, O. A., & Sayed, E. T. (2023, January). Artificial neural networks applications in partially shaded PV systems. *Thermal Science and Engineering Progress*, *37*, 101612. https://doi.org/10.1016/j.tsep.2022.101612

Kim, J., Seo, D., Jang, M., & Kim, J. (2021, November). Augmentation of limited input data using an artificial neural network method to improve the accuracy of water quality modeling in a large lake. *Journal of Hydrology*, *602*, 126817. https://doi.org/10.1016/j.jhydrol.2021.126817

Ozcalici, M., & Bumin, M. (2022, December). Optimizing filter rule parameters with genetic algorithm and stock selection with artificial neural networks for an improved trading: The case of Borsa Istanbul. *Expert Systems with Applications*, *208*, 118120. https://doi.org/10.1016/j.eswa.2022.118120

Lu, F., Liang, Y., Wang, X., Gao, T., Chen, Q., Liu, Y., Zhou, Y., Yuan, Y., & Liu, Y. (2022, July). Prediction of amorphous forming ability based on artificial neural network and convolutional neural network. *Computational Materials Science*, *210*, 111464. https://doi.org/10.1016/j.commatsci.2022.111464

Afandi, A., Lusi, N., Catrawedarma, I., & Rudiyanto, B. (2021). prediction of temperature in 2 meters temperature probe survey in Blawan Geothermal Field using artificial neural network (ANN) method. *SSRN Electronic Journal*. https://doi.org/10.2139/ssrn.3954816

Leong, W. C., Bahadori, A., Zhang, J., & Ahmad, Z. (2019, June 19). Prediction of water quality index (WQI) using support vector machine (SVM) and least square-support vector machine (LS-SVM). *International Journal of River Basin Management*, *19*(2), 149–156. https://doi.org/10.1080/15715124.2019.1628030

Aldrees, A., Awan, H. H., Javed, M. F., & Mohamed, A. M. (2022, December). Prediction of water quality indexes with ensemble learners: Bagging and boosting. *Process Safety and Environmental Protection*, *168*, 344–361. https://doi.org/10.1016/j.psep.2022.10.005

Portillo Juan, N., & Negro Valdecantos, V. (2022, September). Review of the application of artificial neural networks in ocean engineering. *Ocean Engineering*, *259*, 111947. https://doi.org/10.1016/j.oceaneng.2022.111947

Zamri, N., Pairan, M. A., Azman, W. N. A. W., Abas, S. S., Abdullah, L., Naim, S., Tarmudi, Z., & Gao, M. (2022). River quality classification using different distances in k-nearest neighbors algorithm. *Procedia Computer Science*, *204*, 180–186. <https://doi.org/10.1016/j.procs.2022.08.022>

Satish, N., Anmala, J., Rajitha, K., Varma, M. R. R., (2024). A stacking ANN ensemble model of ML models for stream water quality prediction of Godavari River Basin, India. *Ecological Informatics, 80*, 102500. <https://doi.org/10.1016/j.ecoinf.2024.102500>.

Murivhami, T., Tartibu, L.K. and Olayode, I.O (2023). Applications of artificial neural network in the prediction of water quality index, *2023 14th International Conference on Mechanical and Intelligent Manufacturing Technologies (ICMIMT).* Cape Town, South Africa (pp. 100-104). doi: 10.1109/ICMIMT59138.2023.10199388.

Guo, L. And Fu, D. ((2023). River Water Quality Prediction Model Based on PCA-APSO-ELM Neural Network, *2023 6th International Conference on Artificial Intelligence and Big Data (ICAIBD)*. Chengdu, China (pp. 512-517). doi: 10.1109/ICAIBD57115.2023.10206249.

[Babu](https://ieeexplore.ieee.org/author/37089792243), S., [Nagaleela](https://ieeexplore.ieee.org/author/37089798652), B. B., [Karthik](https://ieeexplore.ieee.org/author/37089798793), C.G., [Yepuri](https://ieeexplore.ieee.org/author/37089791713), L.N. (2023). Water Quality Prediction using Neural Networks, *2023 International Conference on Artificial Intelligence and Knowledge Discovery in Concurrent Engineering (ICECONF)*. Chennai, India (pp. 1-6). doi: 10.1109/ICECONF57129.2023.10084120.

<table>
<tbody>
<tr class="odd">
<td><blockquote>
<p><img src="65d4394b2b1c0_media/media/image13.png" style="width:1.01042in;height:0.36111in" alt="A picture containing text, clipart Description automatically generated" /></p>
</blockquote></td>
<td>© 2024 by the authors. Submitted for open access publication under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).</td>
</tr>
</tbody>
</table>

1.  2<sup>\*</sup> Corresponding author. *E-mail address*: <norli097@uitm.edu>.my
