## 5 Results and Discussion  
Figure 6 shows the SHAP values obtained for different damage classes when the SVM and the kNN algorithms are applied; similarly, Figure 7 shows the mean SHAP values for the features. The plots of Figure 6 present the features sorted along the \(y\)-axis depending on their impact on the output, but they also report the SHAP values of every feature computed on each example of the dataset. As stated in Shapley [92], for the feature with the highest importance, their SHAP values span over a greater range than the rest. Points are also coloured depending on their value. In this way, it is easy to figure out when a feature has a high or low impact on the output and when it contributes to increasing or decreasing the base probability value of each class. Interestingly, the impact on model outputs given by the analysed features is similar in both the ML models. For instance, high values of the feature \(p_{6}\) have a positive impact for the class zero and the class one, whereas high values of the feature \(p_{6}\) have a negative impact for the class two, which is the outer race damage. This means that signals characterised by high values of \(p_{6}\) are very unlikely to belong to bearings that are damaged on the outer race. For some features, such as \(p_{19}\) and \(p_{3}\), a similar attitude is detectable for both the models. Figure 5: SHAP explanation for a single prediction. Figure 7 reports the SHAP values of the ten most important features, which are sorted depending on their average impact on predictions for the three different defect conditions. As it can be seen from those plots, \(p_{6}\), which is the skewness parameter, is by far the most important feature for the classification of the bearing defect condition for both the SVM and kNN algorithms. Skewness is the ratio of the average deviation from the mean cubed divided by the standard deviation cubed; for a random variable with normal distribution, the skewness is zero. Higher values of skewness discriminate between an outer race defect and the other two defect conditions. For classes zero and two, the skewness has a much higher mean SHAP value than the other features. Other important features for both the  
Figure 6: SHAP values: (**a**) SVM Shapley values for class 0 (normal); (**b**) kNN Shapley values for class 0 (normal); (**c**) SVM Shapley values for class 1 (IR damage); (**d**) kNN Shapley values for class 1 (IR damage); (**e**) SVM Shapley values for class 2 (OR damage); and (**f**) kNN Shapley values for class 2 (OR damage). algorithms that belong to the time-domain are \(p_{3}\), the squared mean root of absolute values (SMRA), which is determinant in the recognition of the defect-free class, and \(p_{10}\), the shape factor, which is a parameter dependent on the signal shape that seems to be important in the discrimination between the inner and the outer race defect, especially for the SVM. The skewness and shape factor were also found to be relevant features in other works, such as the one from [PERSON] et al. [41]. The last two relevant parameters that are in common with both the algorithms are \(p_{18}\) and \(p_{19}\): the former, which is the root mean square frequency, is nearly the most important feature for class one, while the latter has a greater impact on kNN. After the SHAP analysis was carried out, the four most important features of each class were selected for the SVM and kNN algorithms. Table 4 reports all the selected features for each algorithm. In kNN, only five features appear in the top four places of the three different defect-related classes, while the most relevant features related to the SVM are  
Figure 7: Mean SHAP values: (**a**) SVM mean Shapley values for class 0 (normal); (**b**) kNN mean Shapley values for class 0 (normal); (**c**) SVM mean Shapley values for class 1 (IR damage); (**d**) kNN mean Shapley values for class 1 (IR damage); (**e**) SVM mean Shapley values for class 2 (OR damage); and (**f**) kNN mean Shapley values for class 2 (OR damage). nine.