## 3 Materials and Methods
### Methodology
#### 3.4.5 Predictive Model: One Dimensional Convolutional Neural Network (1D-CNN)  
Convolutional neural network was first introduced by [PERSON] [44]. Today, one-dimensional convolutional neural network (1D-CNN) is mostly used in time-series data [45]. 1D-CNN architecture has achieved the state-of-the-art for signal processing such as ECG, fault detection, structural damage detection, and so on [46; 47; 48; 49; 50; 51; 52; 53; 54]. In 1D-CNN architecture, the time series data is fed as an input to the input layer and the input convolves with multiple kernels/filters/weights (w) in the intermediate convolutional layers (l). A convolution is a linear operation that performs the dot product operation between the weights and the inputs of the input layers. The weights are assigned randomly during the convolutional operation, which are responsible for extracting the input features. The dot product is an element-wise multiplication between the inputs and the weights, which are then summed, resulting in a single value. The intermediate convolutional layer consists of n number of neurons, where the linear transformation takes place through the weighted summation by the weighted scalar [55; 56; 57]. Furthermore, 1D-CNNs are advantageous, since the model uses weight sharing, allowing it to converge with fewer parameters. Hence, it makes the 1D-CNN converge quickly [58]. The proposed model has 64 weights which has been shown in Table 1. The weights \((w_{1},w_{2},w_{3}\ldots w_{64})\) are shared by both input layer \((x_{1},x_{2},x_{3}\ldots x_{n})\) and output layer \((o_{1},o_{2},o_{3}\ldots o_{n})\). The linear transformation between inputs and weighted scaler occurs in the following way:  
\[ \begin{split} p_{1}&=w_{1}x_{1}+w_{2}x_{2}+w_{3}x_{ 3}+\ldots w_{64}x_{64}\\ p_{2}&=w_{1}x_{2}+w_{2}x_{3}+w_{3}x_{4}+\ldots w_{64 }x_{65}\\ p_{3}&=w_{1}x_{3}+w_{2}x_{4}+w_{3}x_{5}+\ldots w_{64 }x_{66}\\ p_{4}&=w_{1}x_{4}+w_{2}x_{5}+w_{3}x_{6}+\ldots w_{64 }x_{67}\end{split}  \tag{4}\]  
The scaler outputs \((p_{1},p_{2},p_{3}\ldots p_{n})\) are then passed through a non-linear function. \[ \begin{split} o_{1}&=g(p_{1})\\ o_{2}&=g(p_{2})\\ o_{3}&=g(p_{3})\\ o_{4}&=g(p_{4})\end{split}  \tag{5}\]  
The formula for intermediate transformation layer in 1D-CNN is stated below:  
\[p_{j}^{l}=b_{j}^{l}+\sum_{i=1}^{m_{l-1}}conv1D(x_{i}^{l-1}*w_{ij}^{l-1}) \tag{6}\]  
where, \(p_{j}^{l}\) denotes the input, \(w_{ij}^{l-1}\) denotes the weight from the \(i\)th neuron at layer \(l-1\), \(x_{i}^{l-1}\) denotes the output of the \(i\)th neuron at layer, \(b_{j}^{l}\) denotes the bias of the \(j\)th neuron at layer \(l-1\). \(p_{j}^{l}\) are then passed through a activation function for the intermediate output. \[o_{j}^{l}=g(p_{j}^{l}) \tag{7}\]  
In multilayer 1D-CNN, \(o_{1},o_{2},o_{3}\ldots o_{n}\) are supposed to be the inputs for the next layer \((l+1)\). For a single layer, the outputs will pass through the fully connected layer. Before passing into the fully connected layer, the network is flattened into a single vector to be used for the fully connected layer. Therefore, a fully connected layer gives the final probabilities for every label. This process is known as feed-forward propagation. Since the weights initialized randomly, the fully connected layer's final probabilities have minimal chance of meeting the expected result, which is eventually responsible for poor accuracy. The neural network develops a cost function that penalizes outputs far from the expected value. Neural network's weights are updated with the help of partial derivatives \(\frac{\partial f(x)}{\partial x}\) and chain rule. The whole procedure of updating the weights using gradient descent is known as backpropagation. Therefore, backpropagation is the fine-tuning method, which updates each layer's weights based on the error rate obtained in the previous iteration. Backpropagation learns the patterns by calculating the gradient of a loss function with respect to all network weights.