# An Examination of Thermal Features' Relevance in the Task of Battery-Fault Detection
## 3 Adjustments, Testing and Results
### Supervised Relevancy Estimation  
The same representation of the examined variables is applied also in these final examinations. The Kraskov MI estimation simply calculates the amount of shared information between two variables. In all cases, it is the relevancy estimation of the multivariate input variable towards the target variable, which is represented by the binary output indicating only fault or failure-free state, or it is the categorical output variable containing identifiers of all examined battery sets. The value of MI is an entropy based measure that makes its output value relative to the character of examined data. A binary target variable possesses less sharable information, when compared to the target variable of continuous values, where the MI is not upper-bound. Table 3 compares the values of estimated MI of both variables during charging and discharging processes. The Temp 1-6 means MI for thermal features towards the categorical variable containing the numbers of battery sets. The Temp 0-1 means MI for thermal features towards only the binary variable indicating a fault state. The MIs of the voltage vectors are depicted in the same manner accordingly. Figure 11: The gap statistic (**left**) and the silhouette score (**right**) of the obtained clustering solutions of reduced data that are measured during discharging period. Figure 10: The gap statistic (**left**) and the silhouette score (**right**) of the obtained clustering solutions of reduced data that are measured during charging period. \[accuracy=\frac{Y_{p}^{tp}+Y_{p}^{tn}}{Y_{p}} \tag{6}\]  
\[precision=\frac{Y_{p}^{tp}}{Y_{p}^{tp}+Y_{p}^{fp}} \tag{7}\]  
\[recall=\frac{Y_{p}^{tp}}{Y_{p}^{tp}+Y_{p}^{fn}} \tag{8}\]  
\[F=2\times\frac{precision\times recall}{precision+recall} \tag{9}\]  
We employed the kNN classification algorithm and based on the given reduced representations, we modeled the classification performance of the randomly shuffled and split data. They were split into 60% for training data and 40% for testing data. The classification was again performed in order to classify the data into the binary targets and also to create a classification able to correctly distinguish between the given battery sets. The performance on this categorical target variable can be seen in Figures 12-15. Simple percentages and absolute amounts of classification success rates are written on the diagonal of the confusion matrices, while the misclassified samples are spread in the rest of the matrix according to the distribution of the classification errors. For each confusion matrix, the predicted label stands for the predicted value of the given sample by trained kNN algorithm, while the true label is the desired value of that sample. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Kraskov’s MI** & **Tem 1–6** & **Tem 0–1** & **Vol 1–6** & **Vol 0-1** \\ \hline Charging & 1.6599 & 0.6552 & 1.6880 & 0.6561 \\ Discharging & 1.4259 & 0.5324 & 1.6182 & 0.5992 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The MI coefficients from multivariate estimation gathered from reduced thermal and voltage vectors during charging and discharging period. Figure 12: Confusion matrices produced by kNN prediction based on temperature data during charging period. The matrix of percentages between correctly and incorrectly classified samples (**left**) is accompanied by a confusion matrix covering the absolute values of the same classified samples (**right**). Figure 14: Confusion matrices produced by kNN prediction based on temperature data during discharging period. The matrix of percentages between correctly and incorrectly classified samples (**left**) is accompanied by a confusion matrix covering the absolute values of the same classified samples (**right**). Figure 13: Confusion matrices produced by k nearest neighbor (kNN) prediction based on voltage data during charging period.