# A Novel Method of Seismic Signal Detection Using Waveform Features
## 4 Implementation  
### Data Preparation  
We choose a specific area of Japan and adjacent seas where earthquakes occur more frequently and can provide a large number of historical events for study, guaranteeing the data used for the research are sufficient. Then, three years (from May 2011 to May 2014) of data from the KSRS station about 266 events are selected as the data set, and it is randomly divided into a training set and a test set. Furthermore, the same amount of impulsive noise data are chosen as part of the test set.  
In this section, we select a specific region for studying how to detect the teleseismic P phase accurately. As depicted in Figure 4, the location and size of the region is longitude (29\({}^{\circ}\) N\(\sim\)44\({}^{\circ}\) N) and latitude (131\({}^{\circ}\) E\(\sim\)146\({}^{\circ}\) E). The reason for picking a specific region is the covariance function in the Gaussian process is related to the correlation of the signals, and the mean function is the linear combination of kernel functions about input points. If the selected region is too wide, the correlation of the signals will be weak. In supervised learning, the concept of similarity between data points is crucial.  
Figure 3: The empirical mode decomposition (EMD) diagram of signal and noise. In the subgraphs (**a**,**b**), the top curve is the original signal, and others are intrinsic modal components with the frequency decrement from high to low. The intrinsic mode function 1 (IMF1) of seismic is the main component compared to the IMF1 of noise.  
Figure 2: The FFT spectrum of seismic signal and noise. The subgraph (**a**) indicates the signal spectrum of FFT. The subgraph (**b**) is the noise spectrum of FFT. We can see that the differences between the seismic and noise spectrum are in the frequency band of 1–2 Hz.  
This is an underlying assumption that points close to the input \(x\) are likely to have similar target values, so training points close to the test points can provide information for prediction, see Equations (4)-(14).  
To further explain the relationship between distance and correlation, we select three locations among the corner area of (33\({}^{\circ}\) N\(\sim\)38\({}^{\circ}\) N) and (135\({}^{\circ}\) E\(\sim\)140\({}^{\circ}\) E), which are (136\({}^{\circ}\) E, 34\({}^{\circ}\) N), (135.4\({}^{\circ}\) E, 37\({}^{\circ}\) N), and (139.6\({}^{\circ}\) E, 36\({}^{\circ}\) N). As shown in Figure 5, except for the blue line, the other three lines indicate three locations where the earthquake occur possibly. The vertical axis represents the locations of historical events. The horizontal axis shows the location correlation between the new predictive signal and observed seismic events. The larger the corresponding value on the vertical axis, the greater the possibility of a new seismic signal occur in this area. The blue line represents a location where an event has never occurred at (137\({}^{\circ}\) E, 35\({}^{\circ}\) N). As can be seen from the image, the covariance of the blue line is zero in all locations; that is, the occurrence of a new seismic signal in the point cannot be predicted.