# Engine Fault Detection by Sound Analysis and Machine Learning
## 4 Results and Discussion
### Results for MFCC-Based Features  
The performance of the vehicle fault diagnosis model using MFCC-based features is evaluated and summarized in Table 5. Various configurations of MFCC parameters, including the number of coefficients and window length, were tested to identify the optimal settings. The table also presents the best hyperparameters found through Grid Search for the ELM classifier, such as the activation function and number of neurons, alongside the resulting precision, recall, F1-score, and accuracy metrics. A 50% window overlap was used in all experiments to enhance feature extraction. The results, which are given in Table 5, indicate that using 20 MFCC coefficients with a window length of 0.03 s and a _sine_ activation function yielded the highest performance with a precision of 92.24%, recall of 92.22%, F1-score of 92.10%, and accuracy of 92.14%. This demonstrates that the choice of MFCC parameters and ELM hyperparameters significantly impacts the classification performance. From the table, it can be observed that the number of MFCC coefficients and window length significantly affect the performance of the proposed method up to a certain point. Specifically, increasing the number of MFCC coefficients from 5 to 20 generally leads to an improvement in precision, recall, F1-score, and accuracy. However, further increasing the number of coefficients to 30 does not seem to result in any significant improvement. Similarly, increasing the window length from 0.02 to 0.03 or 0.04 generally leads to an improvement in performance, with the best results achieved at a window length of 0.03 for most MFCC parameter configurations. However, the choice of activation function and the number of neurons in the ELM classifier also seem to play a role in achieving the best performance. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multicolumn{2}{c}{**MFCC Parameters**} & \multicolumn{3}{c}{**Best ELM**} & \multicolumn{3}{c}{**Performance Results**} \\  & \multicolumn{3}{c}{**Hyperparameters**} & & & & \\ \hline \multirow{2}{*}{ \begin{tabular}{c} **Number of** \\ **Coefs.** \\ \end{tabular}  } & \multirow{2}{*}{ \begin{tabular}{c} **Window** \\ **Length** \\ \end{tabular}  } & \multirow{2}{*}{ \begin{tabular}{c} **Activation** \\ **Function** \\ \end{tabular}  } & \multirow{2}{*}{ \begin{tabular}{c} **Number of** \\ **Neurons** \\ \end{tabular}  } & \multirow{2}{*}{**Precision**} & \multirow{2}{*}{**Recall**} & \multirow{2}{*}{\ \begin{tabular}{c} **Macro** \\ **F1-Score** \\ \end{tabular}  } & \multirow{2}{*}{ \begin{tabular}{c} **Weighted** \\ **F1-Score** \\ \end{tabular}  } & \multirow{2}{*}{**Accuracy**} \\  & & & & & & & \\ \hline
5 & 0.02 & tribas & 100 & 86.19 & 85.60 & 85.70 & 85.72 & 85.71 \\
10 & 0.02 & sig & 100 & 90.09 & 89.24 & 89.34 & 89.31 & 89.29 \\
20 & 0.02 & sin & 100 & 89.95 & 90.02 & 89.91 & 89.88 & 90.00 \\
30 & 0.0 The confusion matrix for the model with 20 MFCC coefficients and a window length of 0.02 s, shown in Figure 5, provides additional insights into the model's performance. Each cell in the matrix represents the number of instances for which the true class is represented by the row and the predicted class is represented by the column. Overall, the confusion matrix confirms that the model performs well across most fault types, with particularly high accuracy for airflow, front-end, and spark plug faults. Specifically, the model achieves the highest performance in detecting airflow faults with an accuracy of 98.1%, correctly identifying 51 out of 52 cases. However, the model shows the lowest performance in identifying healthy cases, with an accuracy of 80.0%, correctly predicting 40 out of 50 instances. This suggests that healthy cases are more prone to being misclassified as faults, indicating an area for further refinement. The results of the experiments using MFCC-based features demonstrate the effectiveness of the proposed method for fault diagnosis in vehicles.