# A Method of Barkhausen Noise Feature Extraction Based on an Adaptive Threshold
## 3 Results
### Comparison of Modeling Results  
The MBN features used in this paper to establish a stress prediction model are: RMS (\(x_{1}\)), mean value (\(x_{2}\)), energy (\(x_{3}\)), entropy (\(x_{4}\)) and adaptive pulse count (\(x_{5}\)). Mean value describes the magnitude of the DC (Direct Current) component in MBN signals. The entropy feature is a measure of the uncertainty of a random variable [11]. For a discrete signal, if the possible value is \(\{x_{1},x_{2},\ldots,x_{n}\}\), the corresponding probability is \(\{P(x_{1}),P(x_{2}),\ldots,P(x_{n})\}\), and entropy can be calculated as follows:  
\[Entropy_{MBN}=-\sum_{i}P(x_{i})\log_{b}P(x_{i}). \tag{4}\]  
When \(b=2\), the unit of entropy is bit; when \(b=e\), the unit of entropy is nat; when \(b=10\), the unit of entropy is Hart. Entropy can be used to measure the uncertainty of MBN signals. The larger the uncertainty of MBN signal, the larger entropy feature. K-Fold Cross-Validation is used to verify the model [12]. The steps are as follows: (1) Divide the data set into \(K\); (2) Each time one of them is used as a test set, the other \(K-1\) are used as a training set to train the model; (3) Mean square error (MSE) of the model on the test set is calculated; (4) Repeat the above \(K\) times, and average the MSE to obtain the evaluation criteria of the model (Root Mean Square Error,\(RMSE_{CV}\)). 10-Fold Cross-Validation is used in the paper. \[RMSE_{CV}=\sqrt{\frac{1}{K}\sum_{i=1}^{K}MSE_{i}}. \tag{5}\]  
In order to verify the effectiveness of adaptive pulse count feature for stress detection, different modelling techniques are compared, including multivariable linear regression (MLR) and multilayer perceptron (MLP). Coefficients of MLR are solved by the least square method. MLP is trained using backpropagation (BP). The square error is used as the loss function. The advantage of MLP is that the model learned is nonlinear. The \(RMSE_{CV}\) and coefficient of determination (R\({}^{2}\)) of the comparison experiment are shown in the Table 4. \(x_{\text{th}=0.1}\) and \(x_{\text{th}=0.01}\) are features of pulse count extracted when threshold is 0.1 and 0.01 respectively. (1) There are two hidden layers in the MLP method, but different numbers of hidden layer nodes have the same effect on the results. The number of hidden nodes in the Table 4 is 10,10. (2) By comparing the first and second lines, it can be found that adding the adaptive pulse count feature (\(x_{5}\)) can improve the accuracy of stress detection. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Line** & **Method** & **Features** & \(RMSE_{CV}\) & **R\({}^{2}\)** \\ \hline
1 & MLR & \(x_{1}\)\(x_{2}\)\(x_{3}\)\(x_{4}\) & 14.084 & 0.978 \\ \hline
2 & MLR & \(x_{1}\)\(x_{2}\)\(x_{3}\)\(x_{4}\)\(x_{5}\) & 13.307 & 0.980 \\ \hline
3 & MLR & \(x_{1}\)\(x_{2}\)\(x_{3}\)\(x_{4}\)\(x_{\text{th}=0.1}\) & 13.395 & 0.980 \\ \hline
4 & MLR & \(x_{1}\)\(x_{2}\)\(x_{3}\)\(x_{4}\)\(x_{\text{th}=0.01}\) & 14.672 & 0.978 \\ \hline
5 & MLP (BP) & \(x_{1}\)\(x_{2}\)\(x_{3}\)\(x_{4}\) & 6.468 & 0.995 \\ \hline
6 & MLP (BP) & \(x_{1}\)\(x_{2}\)\(x_{3}\)\(x_{4}\)\(x_{\text{3}}\) & 6.002 & 0.996 \\ \hline
7 & MLP (BP) & \(x_{1}\)\(x_{2}\)\(x_{3}\)\(x_{4}\)\(x_{\text{th}=0.1}\) & 6.251 & 0.995 \\ \hline
8 & MLP (BP) & \(x_{1}\)\(x_{2}\)\(x_{3}\)\(x_{4}\)\(x_{\text{th}=0.01}\) & 8.324 & 0.992 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison of different modeling methods. Multivariable linear regression (MLR) and multilayer perceptron (MLP). (3) By comparing the second, third and fourth lines, pulse count features of other thresholds (\(x_{\text{th=0.1}}\), \(x_{\text{th=0.01}}\)) reduce the prediction accuracy of the model. If the threshold is not chosen properly, the prediction accuracy is worse than not adding the pulse count feature. (4) The results of the MLR and MLP models show that the adaptive pulse count feature (\(x_{5}\)) has a lower RMSE, which contributes to stress detection.