## 4 Results and Analysis
### WASN-Based Analysis in Real-Life Scenarios
#### 4.3.2 The Recognition Accuracy of Audio Streaming  
A reliable car horn detection algorithm has to make a decision whether a car horn has occurred based on distinct features of an audio signal. In addition, in the real environment, there are complex interference factors such as different acoustic events with different lengths and inconsistent background noises, which will affect the recognition accuracy of our system in a practical application. To test the accuracy of the car horns in the audio streaming, we recorded a 30-min audio streaming at the campus gate for testing. We adopted binary classification methods such as fall detection [32], and the following three success criteria could be used to measure its performance.  
(1) Recall: The capacity of the system to detect car horns only when they occur.  
\[\text{Recall}=\frac{TP}{TP+FN}\times 100\% \tag{13}\]  
(2) Precision: The capacity of the system to detect car horns. It is the ratio of true positives to the number of car horns.  
\[\text{Precision}=\frac{TP}{TP+FP}\times 100\% \tag{14}\]  
(3) F1-score: A harmonic average of model accuracy and recall.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Species** & **Car Horn** & **Background** \\ \hline Train & 1160 & 1052 \\ Test & 523 & 474 \\ C-V & 59 & 53 \\ Total & 1742 & 1579 \\ \hline \hline \end{tabular}
\end{table}
Table 6: The number of samples in our dataset.  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & **Car Horn** & **Background** \\ \hline
**Car Horn** & 491 & 32 \\
**Background** & 10 & 464 \\ \hline \hline \end{tabular}
\end{table}
Table 7: Confusion matrix of the CNN model before compression.  
\begin{table}
\begin{tabular}{c c c} \hline \hline  & **Car Horn** & **Background** \\ \hline
**Car Horn** & 480 & 43 \\
**Background** & 9 & 465 \\ \hline \hline \end{tabular}
\end{table}
Table 8: Confusion matrix of the CNN model after compression.  
\[F1=\frac{2\times\text{Percision}\times\text{Recall}}{\text{Precision}+\text{Recall}} \times 100\% \tag{15}\]  
where _TP_ refers to the true positive (i.e., a car horn occurs and the algorithm detects it), FN is a false negative (a car horn occurs but the algorithm does not detect it), and FP is the false positive (a car horn does not occur but the algorithm reports a car horn).  
In fact, the audio streaming contains 74 car horns. As shown in Table 9, our system accurately recognized 71 car horns but missed three car horns and incorrectly recognized 16 other sounds as the car horn. There are two reasons for the high false positive. First, the training data and test data are collected in a real environment where complex and variable background noise exist. We artificially checked the audio streaming and found that there are 11 engine sounds, two brake sounds, and two shouts in the 16 FP samples. Their spectral components were similar to the car horn, which is also the cause of the false positive. Second, the training data used in our system were limited, which resulted in finitely pure features of the car horn when we extracted features. With the increase of training data, the samples of false positive will be reduced. We considered that the model of the system has a good performance in sensitivity (95.9%) and precision (81.6%). The complex background noise in the real environment, that is, the low SNR, resulted in an imperfect precision but was sufficient for a real-life application.