## 4 Experimental Methodology
### Feature Ranking Methods
#### 4.3.1 \(T\)-Test  
\(T\)-test can be applied between two classes to compare their means and conclude whether they are from the same distribution. In doing so, it is assumed that the distribution of the parameter under examination is normal. A high \(t\)-test value for a given parameter indicates that the investigated parameter (feature) varies widely for each class and, hence, represents a suitable choice for training a machine learning classification algorithm. The computation of the T-value for each pair of parameters is according to the Formula (1), where \(\overline{x}_{1}\) and \(\overline{x}_{2}\) are the means of the two groups being compared, \(s_{1}^{2}\) and \(s_{2}^{2}\) are the pooled standard errors of the two groups, and \(n_{1}\) and \(n_{2}\) are the number of observations in each of the groups. \[T_{score}=\frac{\overline{x}_{1}-\overline{x}_{2}}{\sqrt{\left(\frac{s_{1}^{2 }}{n_{1}}+\frac{s_{2}^{2}}{n_{2}}\right)}} \tag{1}\]  
When selecting appropriate features using a \(t\)-test, the null hypothesis and alternative hypothesis are critical in determining the significance of each feature with the target variable. The null hypothesis usually assumes that there is no significant difference in the mean values of an element between different groups of the target variable. That means that the attribute provides no discriminating power between groups and any observed differences in means are caused by random chance. In the present research, the null hypothesis is established as follows:  
**H0:**: _There is no significant difference between anomalous and normal data for the values of the investigated feature._  
The alternative hypothesis suggests that there is a statistically significant difference in the mean values of the feature between the groups. This indicates that this feature could potentially be useful for distinguishing between classes and should be considered for inclusion in the model. The alternative hypothesis is stated as follows:  
**H1:**: _The difference between the anomalous and normal data in the investigated feature is substantial, making it meaningful for classification tasks._  
After calculating \(T_{score}\) values for each parameter, the features were sorted by importance. The histograms in Figure 7 show all calculated features for each axis, sorted by importance. After the performed calculation, it is important to compare \(T_{score}\) values with the defined critical value of the \(T_{score}\) to decide if the null hypothesis will be rejected for the selected feature. A lower calculated \(T_{score}\) than the \(T_{score}\) critical value leads to the rejection of the null hypothesis, therefore supporting the alternative hypothesis. This process allows the selection of features that have a statistically significant relationship with the target variable, enhancing the predictive power of the model. The table below (Table 3) shows the parameters for which the alternative hypothesis was accepted. In the present research, the number of degrees of freedom is assumed to be \(df=1498\), the significance level \(\alpha\) is \(\alpha=0.05\), and the critical value of the \(T_{score}\) is \(T_{score}=1.9515\). Based on the \(t\)-test, for sensor 1 for the X\({}_{1}\) axis (Figure 7), the Mean feature has the highest \(T_{score}\), which means that it is the most significant in discriminating between classes. RMS, STD, and Peak Value also show a relatively high \(T_{score}\). For the Y\({}_{1}\) axis, the results are similar to the case of the X\({}_{1}\) axis: Mean has the highest \(T_{score}\). This parameter is followed by  
Figure 7: T-score values for each sensor. For sensor 2, for the X\({}_{2}\) and Z\({}_{2}\) axes (Figure 7), the Mean parameter again leads with the highest \(T_{score}\), followed by the RMS and Std parameters. For the Y\({}_{2}\) axis, the Mean parameter also leads, followed by the STD and Impulse Factor as significant features. For sensor 3, the most significant parameter for the X\({}_{3}\) axis (Figure 7) is RMS, followed by Std and Peak Value.