# Earthquake Detection Using Stacked Normalized Recurrent Neural Network (SNRNN)
## 5 Experiments and Discussion  
In this section about the experiment and discussion, we first discuss the experimental settings and optimized parameters of the SimpleRNN, GRU, and LSTM. We discuss and analyze the individual models' results with and without layer normalization and batch normalization methods. In the end, we discuss the results of our proposed SNRNN model. All of the experiments were carried out, as a rule, on an Intel Core i7-7700 central processing unit operating at 3.60 gigahertz with 16 gigabytes of memory, an NVIDIA GeForce GTX 1080 graphics card, Windows 10, and Keras using the CUDA toolkit. The experiments were designed to compare the performance of three RNN models (SimpleRNN, GRU, and LSTM) with the proposed SNRNN model. The hyperparameters of these models, like batch size, dropout, and epochs, were tuned before the final experiments. These last parameters are shown in Table 3. For all the models, we used the RMSE performance \begin{table}
\begin{tabular}{l l l l} \hline \hline
**Properties** & **Values** & **Properties** & **Values** \\ \hline Period & 2000–2018 & Min. and max. latitude & [35\({}^{\circ}\) to 43\({}^{\circ}\)] \\ No. of events & 6575 & Min. and max. longitude & [25\({}^{\circ}\) to 46\({}^{\circ}\)] \\ Maximum magnitude & 7.9 & Minimum magnitude & 4.0 \\ Mean magnitude & 4.46 & Dominate magnitude & 4.0–5.0 \\ Data split & 75–25 & Scaled min. and max. & 0 to 212 km \\  & & source depth & 25 km \\ Dominate depth & \textless{}15 km & Mean depth & 25 km \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Summary of the Turkey dataset. Figure 6: Risk map of earthquakes in Turkey. measure for network parameter optimization. RMSE is the improved form of mean square error (MSE) and can be calculated using the following equation:  
\[\text{RMSE}=\sqrt{\frac{\sum_{i=1}^{n}(y_{i}-\hat{y}_{i})^{2}}{n}} \tag{10}\]  
It is important to note that the unit scale of the observed data is preserved by the square root mistake. The \(\hat{y}_{i}\) in the equation represents the predicted values based on the model fit, and \(y_{i}\) is the expected value. \(n\) is the size of the values in the dataset. In addition to RMSE's use in assessing quality, a random 75/25 split created a training and testing set from the whole dataset. From the training set, 25% of the data was used for validation during the training. The first type of experiment compared the performance of the three RNN models: SimpleRNN, GRU, and LSTM. The RMSE values obtained by these models are shown in Figure 7. LSTM is usually considered suitable for time-series data. LSTM outperforms the GRU and SimpleRNN models in predicting magnitude and depth. LSTM achieves 4.35 and 4.84 RMSE values for magnitude and depth. The SimpleRNN does not perform well because of its vanishing gradient problems. The GRU and LSTM have gates to deal with vanishing gradient problems. Therefore, the GRU performed better than the SimpleRNN. For the second type of experiment, we used the normalized models of the SimpleRNN, GRU, and LSTM to compare their performance. We added a batch normalization layer or the normalization layer to normalize the input and the mini-batches to train the model faster and increase performance. Again, LSTM+LN and LSTM+BN outperform the others in predicting magnitude and depth. LSTM+LN performs the best among all the models. It achieves 4.14 and 4.65 RMSE values for magnitude and depth, as shown in Figure 8. The models with batch normalization perform a little better than the standard models. When adding layer normalization to these models, all the models perform significantly better. Normalized GRU decreases its performance more than simple GRU. For the third type \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameters** & **RNN** & **GRU** & **LSTM** \\ \hline Batch size & 64 & 32 & 64 \\ Dropout & 0.5 & 0.4 & 0.4 \\ No. of epochs & 20 & 16 & 15 \\ Hidden units & 32 & 64 & 32 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The hyperparameters of RNN, GRU, and LSTM models.