Forecasting Maximum Water Level Data for Post Sangkuliman using An Artificial Neural Network Backpropagation Algorithm

ABSTRACT


A. INTRODUCTION
Technological developments are becoming more sophisticated day by day and developing rapidly.Current technological developments cannot be separated from human life.Recent developments create intelligent technology with the ability to think and make decisions like humans (Dani et al., 2021;Leite, 2022;Thamrin, 2020).Technical intelligence is expected to be able to help with various problems in daily life quickly and accurately (Suhartono et al., 2019).Many artificial intelligences can be applied in many areas of life.Experts are trying to adapt the human brain into a computer system so that it is hoped that, in the future, artificial intelligence can approach the work of the human brain (Atiya et al., 1999).The application of artificial intelligence is often applied to various problems in life, one of which is artificial neural networks (Safitri et al., 2018;Suhartono et al., 2019).
Artificial Neural Network (ANN), often known as Neural Network (NN), is an information processing system that has characteristics similar to biological neural networks (Wang et al., 2021).NN is one of the information systems designed to imitate the work of the human brain in solving a problem by carrying out a learning process through changes in synaptic weights (Khashei & Bijari, 2010;Zhang & Qi, 2005).NNs have been developed as generalizations of mathematical models of human cognition or neural biology.NNs are characterized by a pattern of connections between neurons (architecture), an algorithm for determining connecting weights (training or learning algorithm), and an activation function (Sulandari et al., 2020).NN is useful for pattern recognition, signal processing, classification, and forecasting (Airlangga et al., 2019).The method used in NN modeling is the backpropagation method (Sari et al., 2016).
The backpropagation method can produce better performance in repeated training (Dani et al., 2023).This means that the weight of the NN interconnection can be close to the weight it should be.Another advantage of this method is the ability in the adaptive and multilayer learning process that this method has; there is a weight change process so that it can minimize errors (Mohamed & Hura Ahmad, 2010;Suphawan et al., 2022).The backpropagation method is an excellent method for dealing with complex pattern recognition problems (Ramadani et al., 2022).
Water is a natural resource that has benefits for the survival of humans and other living creatures.A river is a place and container as well as a network of water channels from springs to estuaries (Nugroho et al., 2022).Each river has several watersheds (DAS).The watershed that will be used as the research object by the author is the Mahakam watershed, which is located in the Kutai Kartanegara area.This river has a vital role in the development of the cities through which the river flows because this river functions as the primary drainage end of the city center, a tourist attraction, and provides raw water for the Regional Drinking Water Company (PDAM).Cities traversed by rivers are areas prone to disasters, such as floods.Floods are natural events or phenomena where river water enters land areas when the river level rises.Rising sea levels cause high tide rivers levels due to global warnings (Chu et al., 2018;Mansell et al., 2020).
Floods in the Mahakam watershed are predicted to become more incredible due to rising sea levels and constantly increasing land subsidence.Disasters that occur are not only floods, droughts, and the entry of seawater into rivers will also disrupt the distribution of clean water or drinking water in the area.Where the river water is the raw material for water from the Regional Drinking Water Company (PDAM).Based on the background description, researchers are interested in analyzing data and forecasting river water levels in the Pos Sangkuliman area using the Backpropagation Neural Network method.From the results of the analysis, it is hoped that by knowing the Sangkuliman Post water level, policy makers can pay more attention to preventing damage, excessive human activity, and making maximum use of water.Apart from that, of course it can maintain the ecology of Sangkuliman Post.

B. METHODS 1. Neural Network (NN)
Neural Network (NN) is a computational method for information processing that was developed from biological neural network methods, especially in the human brain.In general, NNs are structured with the same assumptions as biological neural networks, namely: a. Information processing occurs in many simple elements (neurons).b.Signals are sent between neurons via connectors.
c.The connections between neurons have weights that will strengthen or weaken the signal.d.To determine the output, each neuron uses an activity function that is applied to the general input it receives.
In general, NN has three layers, namely the input layer, hidden layer, and output layer.The input layer functions as a place to enter data from the external network for further processing, the hidden layer is a processing unit of data that has been entered and has no direct relationship with conditions outside the network, and the output layer is the network output of the process that has been carried out (Rahman et al., 2015;Tkacz, 2001).

NN Architecture
A typical neural network has anything from a few dozen to hundreds, thousands, or even millions of artificial neurons called units arranged in a series of layers, each of which connects to the layers on either side (Suhermi et al., 2018).Some of them, known as input units, are designed to receive various forms of information from the outside world that the network will attempt to learn about, recognize, or otherwise process.Other units sit on the opposite side of the network and signal how it responds to the information it's understood; those are known as output units.In between the input units and output units are one or more layers of hidden units, which, together, form the majority of the artificial brain.Most neural networks are fully connected, which means each hidden unit and each output unit is connected to every unit in the layers on either side (Adya & Collopy, 1998).The connections between one unit and another are represented by a number called a weight, which can be either positive (if one unit excites another) or negative (if one unit suppresses or inhibits another).The higher the weight, the more influence one unit has on another.(This corresponds to the way actual brain cells trigger one another across tiny gaps called synapses) (Kianfar et al., 2022).Each layer and the pattern of connections between layers has an arrangement of neurons which is called the NN architecture.There are three types of NN architecture, namely: a. Single layer network A single-layer network is a network that does not have hidden layers.This network only accepts input and then directly manages it into output without having to go through hidden layers, as shown in Figure 1.

Activation Function
Every neuron has an internal state, namely activation, where activation is a function of the input it has received.Neurons send activation functions as signals to other neurons.The activation function for the backpropagation method must have several important characteristics, namely continuous, differentiable and not monotonically decreasing.The activation function is expected to saturate, approaching the maximum and minimum values asymptotically.One of the most frequently used activation functions is the binary sigmoid function, where the range is (0,1) and is defined as follows: with its derivatives Another activation function used is the linear (purelin) activation function.This activation function is generally used to produce output values.The activation function of purelin is defined as: and the derivative is

Data Standardization 𝒁 𝒔𝒄𝒐𝒓𝒆
Data standardization can be carried out initially if the variable being measured has several measurement scales.All dimensions or sub-variables can be converted into standard data to achieve data standardization (Ratnasari et al., 2021).  standar dization used, Equation ( 5) is used to calculate   standardization.
Z is results of data standardization toi , x is average, S is standard deviation.

Backpropagation Algorithm
The backpropagation algorithm was used to develop the ANN model.The typical topology of BPANN (Backpropagation Artificial Neural Network) involves three layers: the input layer, where the data are introduced to the network; the hidden layer, where the data are processed; and the output layer, where the results of the given input are produced (Suhermi et al., 2018).A back-propagation algorithm was used for training.It is a convenient and simple iterative algorithm that usually performs well, even with complex data.Unlike other learning algorithms (like Bayesian learning), it has good computational properties when dealing with largescale data.The backpropagation training method involves feedforward of the input training pattern, calculation and backpropagation of error, and adjustment of the weights in synapses.
Backpropagation is an algorithm that is very good at handling complex pattern recognition problems (Sari et al., 2016).This algorithm is one of the most efficient machine learning methods for multi-layer networks in NN because it is quite simple.This algorithm is called backpropagation because when an input pattern is given as a training pattern, the way goes to the units in the hidden layer to be passed on to the output layer units.Next, the output layer units provide responses, which are referred to as network output.When the network output is not the same as the expected output, the result will spread backward to the hidden layer and then forwarded to units in the input layer.The back propagation algorithm consists of two stages, namely feed forward and backward propagation which are described as follows: a. Initialize weights.Determine the initial weight with a fairly small random value, set the maximum iteration value, target error or learning rate.b.If the error target is still not met or the maximum iteration limit has not been reached, then the following steps can be taken: 1) Feed forward process a) Each input unit ( , 1, 2,..., ,

A
x A g g  which is the number of inputs) receives the input signal and sends it to all units in the hidden layer.b) Each hidden layer unit ( , 1, 2,..., ,

B y B h h 
is the number of neurons in the hidden layer) adds up the weight of the input signal in Equation ( 8).
And uses bipolar sigmoid activation function to calculate the output signal of the hidden layer.
is the number of outputs) adds up the weight of the input signal using Equation (10).
And apply a linear activation function to calculate the output signal.
2) Backward propagation process a) Each output unit ( , 1, 2,..., ) receives a target pattern that corresponds to the input training pattern, the residual is calculated using Equation ( 12).
Then calculate the weight correction term that will be used to update , 1, 2,..., .where h is the number of neurons in the hidden layer) adds up the delta input (which is sent to the hidden layer using Equation ( 15)).

BC v B h 
Then, the result will be multiplied by the derivative of the activation function used by the network to produce the error correction factor, which is shown in Equation ( 16).
Next, calculate the weight correction term that will be used to improve c. Checking stop conditions.If the error target has been met or the maximum iteration limit has been reached, then network training can be stopped.

Measure Of Model Goodness
Root Mean Square Error (RMSE) is the square root of Mean Square Error (MSE), which is a value that shows the distance or difference between the estimated value and the actual value.RMSE is a criterion for the goodness of a model with a non-negative value.The smaller the RMSE value produced by a model, the better the model.The formula for calculating the RMSE value is written in Equation (20):

C. RESULT AND DISCUSSION 1. Time Series Plot
A description of the maximum water level data pattern at Sangkuliman Post for the period January 1989 to December 2022 with a time series plot is shown in Figure 3. Based on Figure 3, the overall time series graph appears to show a pattern that repeats itself in certain periods.This recurring pattern tends to occur in the same periods each year.Explicitly, it is quite difficult to determine in which periods the recurring pattern occurs, so we need to do a breakdown for each year.When a breakdown is carried out, it appears that there will be the same pattern for each year in certain months.The breakdown was carried out in 1989, 1994, 1999, 2013, 2017 and 2022, which is shown in Figure 4. Based on Figure 4, it can be seen that after breaking down the data the maximum water level tends to experience an increasing trend at the beginning of the year around April and June.Then it experienced a decline in the range from August to October.Then at the end of the year in December, based on historical data, it shows an average upward trend.

Data Standardization 𝒁 𝒔𝒄𝒐𝒓𝒆
The distribution of the data used to build the Backpropagation Neural Network is 95% for training data and 5% for testing data, so that out of 408 data there are 388 data for training data and 20 data for testing data.For Training and Testing data, data standardization is carried out first before the next stage using Equation (5).

Determination of Input Variables
Determining input variables is based on training data by looking at the cut off lags on the PACF graph.The following PACF graph shows the maximum water level data at Sangkuliman Post in Figure 5. Based on Figure 4, the PACF plot shows significant lags, namely lag 1 and lag 2, so that the network to be built has 2 input variables, namely  −1 and  −2 .

Backpropagation Neural Network
Using the help of R software, the backpropagation training process was carried out with a single layer network and a multilayer network (2 hidden layers) with 1 neuron each, 2 neurons, 3 neurons, 4 neurons, and 5 neurons in the hidden layer.The stopping condition used is a maximum of 10,000,000 iterations and a target error of 0.001.Based on the training process that has been carried out, the RMSE and iteration values obtained for each NN architecture are shown in Table 1.

Series training
Below are some of the NN architectures used, shown in Figure 6.

Best NN Selection
The next stage is to select the best NN using the RMSE criteria.RMSE values can be seen in Table 1.Based on Table 1 it can be seen that all NN architectures are suitable for use to predict the maximum water level at Sangkuliman Post.Table 1 also shows that an NN with 5 neurons in hidden layer 1 and 3 neurons in hidden layer 2 is the best model because the resulting RMSE value is smaller than other NN architectures, namely 1.815.

Forecasting Maximum Water Level at Sangkuliman Post
The following is a comparison plot of actual data and predicted data shown in Figure 7. Based on Figure 7, it can be seen that the predicted data plot tends to follow the actual data so that forecasting can be continued.Furthermore, the results of forecasting maximum water levels for the next 12 periods are shown in Table 2.

D. CONCLUSION AND SUGGESTIONS
Based on the analysis and discussion that has been carried out, it can be concluded that the best model obtained is NN with 5 neurons in hidden layer 1 and 3 neurons in hidden layer 2 with the smallest RMSE value of 1.365.Forecasting results using NN on data from January to December 2023 tend to fluctuate.Based on the results of forecasting with NN, of course this can be additional information in planning and regulating the spatial layout around Sangkuliman Post, apart from that for disaster mitigation and ecosystem maintenance.In the period when there will be an increase and drought, of course this is the right input in taking steps to protect and utilize the area around Sangkuliman Post in a sustainable manner.Suggestions for further research to get a better model architecture use more variations in hidden neurons, hidden layers, activation functions, training algorithms, and training parameters that will be used.Apart from that, you can also use combined methods, such as combining backpropagation with fuzzy.This allows for better forecasting.

Figure 4 .
Figure 4. Breakdown of time series plot for certain years

Figure 7 .
Figure 7.Comparison of actual data and predicted data

Table 1 .
RMSE and Iteration Values for Each NN Architecture

Table 2 .
Maximum Water Level Forecasting Results at Sangkuliman Post