## 2 Materials and Methods
### Proposed Methodology
#### 2.1.1 Multi-Layer Perceptron Neural Network  
Multi-layer perceptron (MLP) is a feed-forward neural network consisting of three types of layers: input layer, hidden layer (s), and output layer. In an MLP, the data flow in the forward direction from the input to the output layer, and the MLPs are trained with the backpropagation learning algorithm, which allows nonlinear mapping between the input and the output layer [23]. Its fast operation, ease of implementation, and requirement of a smaller training set (compared to radial basis neural networks) lead it to be popular among researchers [24].  
In MLP, each neuron in a layer is connected to all neurons in the succeeding layer and connection strength is called weight. The output of each neuron of hidden layers as well as the output layer is a function of the sum of the inputs to the node modified by applying a linear or nonlinear transfer or an activation function [25; 26]. The input layer passes the input vector to the network. An MLP can have one or more hidden layers.  
Figure 1 illustrates an example of an MLP model with two hidden layers. Here, \(X_{i}\) is the input to the \(i^{th}\) neuron in the input layer. \(w_{ij}^{(1)}\) is the weight associated with the \(i^{th}\) neuron of the input layer to the \(j^{th}\) neuron of the first hidden layer, \(w_{ij}^{(2)}\) is the weight of the link connecting the \(i^{th}\) neuron of the first hidden layer to the \(j^{th}\) neuron of the second hidden layer, and \(w_{ij}^{(3)}\) is the weight associated with the \(i^{th}\) neuron of the second hidden layer to the \(j^{th}\) neuron of the output layer. \(b_{i}^{(1)}\) and \(b_{i}^{(2)}\) are the bias values associated with the \(i^{th}\) neuron of the first hidden layer and the \(i^{th}\) neuron of the second hidden layer, respectively. \(b_{j}\) is the bias associated with the \(j^{th}\) neuron of the output layer. \(\varnothing^{(1)}\), \(\varnothing^{(2)}\), and \(\varnothing^{(3)}\) are the activation functions associated with the first hidden layer, second hidden layer, and the output layer, respectively.  
Then, the net output from the \(i^{th}\) neuron of the first hidden layer is given by \(h_{i}^{(1)}\) and the net output from the \(j^{th}\) neuron of the second hidden layer is \(h_{j}^{(2)}\) (see Equations (1) and (2)). The output of the \(j^{th}\) neuron of the output layer will be \(\hat{y}_{j}\) (in our study, \(j=1\)). This is also noted as the imputed rainfall value at Ratnapura by MLP.  
Finally, the MLP network computations can be written as follows:  
\[h_{i}^{(1)}=\varnothing^{(1)}(\sum_{j}w_{ij}^{(1)}X_{i}\ +b_{j}^{(1)})\ \text{where}\ i=1,\ 2,\ 3\ \text{and}\ j=1,\ 2,\ 3,\ 4 \tag{1}\]  
\[h_{j}^{(2)}=\varnothing^{(2)}(\sum_{i}w_{ij}^{(2)}h_{i}^{(1)}+b_{i}^{(2)})\ \text{where}\ i=1,\ 2,\ 3,\ 4\ \text{and}\ j=1,\ 2,\ 3 \tag{2}\]  
Figure 1: A multilayer perceptron model with two hidden layers. The nodes in Input Layer are represented in green colour. The nodes in Hidden Layer are represented in blue colour, and the node in Output Layer is coloured in red.  
\[\hat{y}_{j}=\varnothing^{(3)}\left(\sum_{i}w_{ij}^{(3)}h_{j}^{(2)}+b_{j}\right)\text { where }i=1,\ 2,\ 3\text{ and }j=1 \tag{3}\]