# Rock Crack Types Identification by Machine Learning on the Sound Signal+
## 2 Automatic Recognition Method-Based Spectrograms for Hard Rock Crack Types
### Identification Model for Tensile and Shear Crack Using GPC
#### 2.4.1 Basic Principle of GPC  
The Gaussian process (GP) is a machine learning technology based on Bayesian statistical learning theory, and it exhibits excellent performance in solving nonlinear, small-sample, and high-dimensional problems [31]. In addition, it has the advantage of automatically obtaining hyper-parameters and providing a probability interpretation of the output. It is therefore commonly applied in many fields, such as structure reliability analysis, structure optimization, and signal processing [32; 33; 34].  
There is a training set \(\mathbf{D}=\{(x_{i},\,y_{i})\,|\,I=1,\,2,\,3,\,4,\,\ldots,\,N\}\). The set of input variables is \(\mathbf{X}=[x_{1},\,x_{2},x_{3},x_{4}\ldots\,x_{N}]^{\mathrm{T}}\). The function value of the input variables set is \(\mathbf{Y}=[y_{1},\,y_{2},\,y_{3},\,y_{4}\ldots\,y_{N}]^{\mathrm{T}}\). When a binary classification problem is calculated, the range of the \(y\) value is assumed to be \(y_{i}\in\{-1,\,1\}\). The set of prediction samples is \(\mathbf{f}=[f_{1},\,\ldots\,f_{n}]^{\mathrm{T}}\);\(f_{i}=\)\(f(\mathbf{x}_{i})\).  
The basic assumption of Gaussian process classification (GPC) is that the prediction function \(\mathbf{f}\) conforms to the prior distribution of the Gaussian process, and the response function \(\Phi(\mathbf{x})\) is used to \"compress\" the function range to the interval [0, 1], making the classification probabilistic. The probability of the first-class classification is \(p_{(y\,=\,+1)}\), then  
\[\pi(\mathbf{x})=p(y=+1\,|\,\mathbf{x},\mathbf{w})=\Phi(f(\mathbf{x})) \tag{6}\]  
Similarly, in binary classification, the sum of the probabilities of the entire probability space is 1, so the probability of \(p_{(y\,=\,-1)}\) is \(1-\pi(\mathbf{x  
Based on the learning process of GPC, the prediction is divided into two steps. First, the probability of the posterior function value\(f_{*}\) corresponding to the test point \(x_{*}\) is  
\[p(f_{*}|\mathbf{X}\mathbf{y},\mathbf{x}_{*})=\int p(f_{*}|\mathbf{X},\mathbf{x}_{*},\mathbf{f})p(\mathbf{f}| \mathbf{X}\mathbf{y})df \tag{10}\]  
According to the above formula, the predicted probability of the posterior distribution of \(p\) (\(y=+1\)) can be further calculated:  
\[p(y_{*}=+1|\mathbf{X}\mathbf{y},\mathbf{x}_{*})=\int\Phi(f_{*})p(f_{*}|\mathbf{X},\mathbf{x}_{*}, \mathbf{y})df_{*} \tag{11}\]  
\[\Phi(z)=\frac{1}{\sqrt{2\pi}}\int_{-\infty}^{z}\exp(-\frac{1}{2}x^{2})dx \tag{12}\]  
In Equation (11), \(\Phi(f_{*})\) represents the classification probability corresponding to the test point function value\(f_{*}\). The classification prediction probability distribution of \(f_{*}\) can be calculated by Equation (10).  
Second, classification types are divided according to probability. In the Gaussian process classification (GPC), the minimum misclassification rate is regarded as the threshold. For binary classification problems, \(p\) (\(y_{*}=+1\,|\,\mathbf{X},\mathbf{y},\mathbf{x}_{*}\)) = 0.5 is usually used as the classification limit. When \(p\) is greater than 0.5, \(y_{*}=+1\) belongs to the first category, and when \(p\) is less than 0.5, \(y_{*}=-1\) belongs to the second category.  
\[\left\{\begin{aligned} p(y_{*}=+1|\mathbf{X},y,x_{*})& \geq 0.5&\text{First category}\\ p(y_{*}=-1|\mathbf{X},y,x_{*})&<0.5&\text{Second category}\end{aligned}\right. \tag{13}\]