# A Novel Method of Seismic Signal Detection Using Waveform Features
## 2 Theory and Methods  
### Gaussian Process  
In general, the Gaussian process (GP) regression is a powerful tool, which generates distribution over functions applied to non-parametric regression [36]. In Gaussian process regression, we assume the output \(y\) of a function \(f\) at input \(x\) can be written as  
\[y=f(x)+\epsilon. \tag{1}\]  
In Equation (1), the observation signal \(y\) is composed of the signal term \(f(x)\) and the noise term \(\epsilon\), with \(\epsilon\)\(\sim\)\((0,\sigma_{n}^{2})\) being independent and identically distributed. The distribution of function \(f(x)\) comes from a Gaussian process, which is defined by a mean and a covariance function. \[f(x)\sim\mathcal{GP}(m(x),k(x,x^{\prime})) \tag{2}\]  
\[m(x)=\mathbb{E}[f(x)] \tag{3}\]  
\[k(x,x^{\prime})=\mathbb{E}[(f(x)-m(x))(f(x^{\prime})-m(x^{\prime}))], \tag{4}\]  
where the mean function \(m(x)\) reflects the expected function value at input \(x\). The covariance function \(k(x,x^{\prime})\) shows the correlation between input \(x\) and test point \(x^{\prime}\). The function \(k\) is commonly called the kernel of the Gaussian process [37]. Given an observation data set \(D=(X,y)\) of n elements, where \((X,y)\) is a pair of input-output data, the output \(f_{*}\) is predicted by the conditional distribution \(p(f|D)\) at the test input \(x_{*}\). According to the definition, the joint multivariate distribution of previous observations \(y\) and function values \(f_{*}\) can be expressed as  
\[\left[ \begin{array}{c}y\\ f_{*}\end{array} \right]\sim\mathrm{N}\left(\left[ \begin{array}{cc}K(X,X)+ \sigma_{n}^{2}I&K(X,X_{*})\\ K(X_{*},X)&K(X_{*},X_{*})\end{array} \right]\right), \tag{5}\]  
where \(K(X,X)\), \(K(X,X_{*})\), \(K(X_{*},X)\) and \(K(X_{*},X_{*})\) are \(n\times n\) covariance matrices. These are similarly evaluated from \(n\) training points and \(n\) test points. When there is only one test point, we can calculate the covariance vector between a test point and n training points in same way, indicated as \(K(X,X)\), \(K(X,x_{*})\), \(K(x_{*},X)\) and \(K(x_{*},x_{*})\). We can derive the conditional distribution function \(p(f|D)\), which is the crucial predictive equation for Gaussian process regression,  
\[p(f_{*};X,X_{*})=\mathrm{N}(f_{*},\Sigma_{*}^{f}) \tag{6}\]  
where the mean function is  
\[f_{*}=K(X_{*},X)[K(X,X)+\sigma_{n}^{2}I]^{-1}y \tag{7}\]  
and the covariance function is  
\[\Sigma_{*}^{f}=k(X_{*},X_{*})-K(X_{*},X)[K(X,X)+\sigma_{n}^{2}I]^{-1}K(X,X_{*}). \tag{8}\]  
For the single test point, we can rewrite the mean function in the following way,  
\[m(x_{*})=\sum_{i=1}^{n}w_{i}k(x_{i},x_{*}) \tag{9}\]  
\[w=[K(X,X)+\sigma_{n}^{2}I]^{-1}y, \tag{10}\]  
where \(X\) is the observed data set, \(x_{i}\) is the element in \(X\), \(w_{i}\) is the weight computed by the Equation (10). So we can make a new prediction of new point \(x_{*}\) by weighted sum. The output \(y_{*}\) is associated with the data set \(X\). The kernel shows the similarity between the prediction point \(x_{*}\) and input \(x_{i}\) of the observation set \(X\). The covariance function is also called the kernel. The choice of an appropriate kernel is based on assumptions such as smoothness and likely patterns to be expected in the data [36]. The martet kernel is chosen for the calculation of the Gaussian process, which is usually used in geography. \[k_{\mathrm{Martern}}(r)=\sigma_{f}^{2}\mathrm{exp}\left(\frac{\Gamma(p+1)}{ \Gamma(2p+1)}\right)\sum_{i=0}^{p}\frac{(p+i)!}{i!(p-i)!}\left(\frac{r\sqrt{8 p+4}}{l}\right)^{p-i} \tag{11}\]  
in the Equation (11), \(p\) is an integer, and \(p=v+\frac{1}{2}\). With the \(p=1\), the above formula can be reduced to  
\[k_{v=\frac{3}{2}}(r)=\sigma_{f}^{2}\left(1+\frac{\sqrt{3}r}{l}\right)\mathrm{ exp}\left(-\frac{\sqrt{3}r}{l}\right) \tag{12}\]  
\[r(x,x^{\prime})=\sqrt{d_{earth}(lon,lat),(lon^{\prime},lat^{\prime}))^{2}}, \tag{13}\]  
where \(r\) is the distance between the two points on the surface of the earth and related to the geographic location of longitude and latitude.