# A Seismic Phase Recognition Algorithm Based on Time Convolution Networks
## 4 Experiments
### Evaluation Standards  
The mean error refers to the arithmetic mean of the random errors from all values that have been measured using measurements of equal precision. It is a measure of the expected value of the square of the difference between the parameter estimate and the true value of the parameter. The calculation formula is as follows:  
\[\eta=\frac{1}{n}\sum_{i=1}^{n}\lvert x_{i}-x\rvert \tag{4}\]  
The mean errors can also be identified manually using the following error calculation formula:  
\[Error=||Model\quad predicted\quad time-Manual\quad measuring\quad time|| \tag{5}\]  
Figure 11: A loss function graph of the testing set. Figure 10: A loss function graph of the training set. From Tables 1 and 2, it can be seen that the average error of S-TCN was smaller than that of the traditional TCN. On the testing set and for the arrival of P waves, the proportion of S-TCN results with errors that were less than 0.2 s was 69.27%, which was higher than that of the TCN (63.13%), and the proportion of S-TCN results with errors that were less than 0.5 s was 97.76%, which was also higher than that of the TCN (72.07%). For the arrival of S waves, the proportion of S-TCN results with errors that were less than 0.2 s was 50.84%, which was 5.03% higher than that of the TCN, the proportion of S-TCN results with errors that were less than 0.5 s was 74.86%, which was also higher than that of the TCN (12.85%). This comparison showed that the S-TCN model exhibited a similar performance to that of human experts in detecting the arrival of P and S waves, with the automatic detection results being well within the acceptable error range. The detection error for S waves was larger than the loss error of P waves, probably because seismic S waves are more complicated as they are disturbed by P wave coda, reflected waves, etc. Figure 12 shows examples of successful and failed seismic phase detection. It can be seen from Table 3 that when the 6084 data points were tested, the error increased as more and more P and S waves were identified. The average error of this model was less than 0.1 s and it took 15 s to identify all of the test data under RTX2080 Ti, which showed the superiority of this model in terms of recognition accuracy and recognition speed. It can be seen from Figure 12 that the detection performance of our S-TCN model was better than that of the TCN, but there were examples of detection failures from both networks. From these detection failures, we observed that the signal-to-noise ratio was too low and too much noise was the main cause of the detection failures. Therefore, the efficiency of the current model could be improved by optimizing the noise reduction module, which could be the next scientific research direction. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multicolumn{3}{c}{**P Wave Detection**} & \multicolumn{3}{c}{**S Wave Detection**} \\ \cline{2-7}  & **Average Error** & **Error within 0.2 s** & **Error within 0.5 s** & **Average Error** & **Error within 0.2 s** & **Error within 0.5 s** \\ \hline TCN & 1.25 s & 75\% & 81.90\% & 4.01 s & 17.30\% & 29.80\% \\ SELD-TCN-1 & 0.29 s & 57.50\% & 96.20\% & 0.84 s & 46.10\% & 79.20\% \\ SELD-TCN-2 & 0.34 s & 74.40\% & 94.60\% & 0.91 s & 50.30\% & 76.9\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: A comparison of the detection of P and S waves between the TCN and the SELD-TCN models.