# Identifying Earthquakes in Low-Cost Sensor Signals Contaminated with Vehicular Noise
## 4 Experimental Evaluation
### Experiment 2  
In our second experiment, we created an amalgamated DNN model ([[https://github.com/[PERSON]/Identifying_earthquakes_in_low_cost_sensors_signals_contaminated_with_vehicular_noise/blob/main/Model_Concatenation.ipynb](https://github.com/[PERSON]/Identifying_earthquakes_in_low_cost_sensors_signals_contaminated_with_vehicular_noise/blob/main/Model_Concatenation.ipynb)]([https://github.com/[PERSON]/Identifying_earthquakes_in_low_cost_sensors_signals_contaminated_with_vehicular_noise/blob/main/Model_Concatenation.ipynb](https://github.com/[PERSON]/Identifying_earthquakes_in_low_cost_sensors_signals_contaminated_with_vehicular_noise/blob/main/Model_Concatenation.ipynb)), accessed on 13 September 2023), which includes the two models from Sections 4.2 and 4.3. The purpose of this experiment is for our model to be able to classify the starting point of an earthquake event without confusion from car signals and to perform better than the current methodology used by the stochastic model. This was achieved by combining the two different trained models and concatenating them, thus resulting in a single tensor that is the concatenation of all inputs. Initially, the pre-trained models of noise-cars and noise-earthquakes were loaded, and we applied the concatenation process. After that, we had to load the two-fold synchronized dataset and pre-process the data, which pertained to dropping the unnecessary columns  
Figure 8: Results of the stochastic algorithm’s performance. Figure 9: AUC for the stochastic model. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Accuracy** & **Precision** & **Recall** & **F1 Score** & **AUC Curve** \\ \hline
46\% & 46\% & 100\% & 63\% & 50\% \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Performance metrics for experiment 1.  
and normalizing the data. With our two models in the same shape and the two-fold synchronized dataset in the proper form, our final model was ready to classify the two-fold synchronized dataset. We set a dense layer with the activation function \"sigmoid\", as we needed to differentiate between noise and earthquakes. We considered car signals and noise in the same class, as the task was to find the earthquake events and separate them from any noise signals. To compare the results, we had to classify the two-fold synchronized dataset based on the final model we created. After that, we had to find the first point of every file in the two-fold synchronized dataset, which was classified as an earthquake in order to determine the starting point of the event. This would also be the point where we would assess proper metrics and compare the two experiments. We saved the classified labels along with the true labels, so we could derive the metrics from this experiment. The results of the metrics can be seen in Table 4.  
As we can see, the accuracy is 78%, which means that we see a big improvement when compared to the results of the experiment in Section 4.4, and our model was able to classify the start of the event, in a much more efficient way. Also, the precision of this experiment is 78%, which means our model performed well in finding the actual start of the earthquake events (the positive class). The recall was found to be at 100% due to the one class we have in the predicted labels (we only kept the positive class, which indicates the earthquake). Finally, the F1 score was found to be at 88%, which is likely the most important metric to consider in this experiment, as our target was to classify as many true positives as possible and the AUC curve (shown in Figure 10) was at 51%, which is probably caused by the lack of the negative class in the given dataset. In summary, the results, as illustrated in Figure 11, firmly validate the efficacy of our proposed methodology when compared to the stochastic approach. Our proposed model exhibits notably superior performance, emphasizing its potential in practical applications. Specifically, our proposed model achieves comparable results in the recall metric when contrasted with the stochastic model.