# Respiratory Sound Classification by Applying Deep Neural Network with a Blocking Variable
## 4 Experiment Result
### Discussion  
Firstly, we found the short-time Fourier transform and wavelet transform were the most effective inputs of the convolution neural network model. The short-time Fourier transform takes out the features in the time domain and frequency domain, and the wavelet transform balances the local spectral and temporal information that provides the additional information that short-time Fourier transform does not capture. Secondly, our Blnet network outweighed all the other convolution neural networks in the respiratory sound classification task, evidenced by producing the best prediction result. This is mainly attributed to the fact that the Blnet network incorporates the strength of the ResNet, GoogleNet, and the self-attention layer, and that we used a slightly smaller deep neural network to adapt to the limited data problem. In common architectures of the convolution neural network, people expand the channel size and reduce the size of the image, but we found that continuing to expand the channel size and reducing the size of the image did not make the performance of the model better due to the insufficient data. Thus, we kept the channel size to be 64 and only reduced the size of the image from 128 to 32 through 2 Block-I layers. The Blnet network has 1,147,074 parameters in total. By comparison, even the smallest ResNet-16 has 14,356,544 parameters. Thirdly, using different kernel sizes and average pooling is advantageous because the adventitious sound could be between a small time interval and a large time interval. Furthermore, adding the self-attention layer is an effective way to improve the model's performance. This is because one dimension of the spectrogram and scalogram is time, and there will be connections between the pixels in that dimension. The attention mechanism successfully expands the horizon of the network and helps the network retain more robust information and remove less important information. Fourthly, a simplified loss function is suggested in this paper,  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Method** & \(\mathbf{S_{e}}\) & \(\mathbf{S_{p}}\) & **Score** \\ \hline Our proposed method & 63.99\% & 78.72\% & 71.35\% \\ Without fixed window size & 61.10\% & 79.94\% & 70.52\% \\ Without multiple kernels & 62.19\% & 78.09\% & 70.14\% \\ Without wavelet transform & 58.21\% & 81.13\% & 69.67\% \\ Without Self-attention & 59.01\% & 79.61\% & 69.31\% \\ Four-output loss function & 59.51\% & 80.31\% & 69.91\% \\ Four Block-I layers & 59.75\% & 81.51\% & 70.63\% \\ Six Block-I layers & 55.52\% & 78.59\% & 67.06\% \\ \hline \hline \end{tabular}
\end{table}
Table 3: Ablation test results (\(S_{e}\) indicates the sensitivity, and \(S_{p}\) indicates the specificity).  
which facilitates the network's understanding of the relationship between those four classes. Finally, including the blocking variable in the neural network was proven to be an effective way to improve the performance of a deep neural network. Other researchers can easily add the blocking variable into their framework because the only adjustment made is on the fully connected layer. A two-stage training process is proposed instead of training with the blocking variable from the beginning. This is because the blocking variable is only effective when the model has already extracted robust features. Although the blocking variable itself is not helpful for the classification, it could influence the features extracted by the model and their impact on the classification. If it is put into the model at the beginning, it would be more likely to be considered noise by the back-propagation. This is because the model will only consider whether the information itself is useful at the beginning, yet each cluster in Table 1 has the similar proportion of four labels.