# Explainable Artificial Intelligence for State of Charge Estimation of Lithium-Ion Batteries
## 4 Experiments and Results
### E3: SoC Estimation Guided by xAI and Importance Estimates  
As mentioned in Section 2, there are methods that can inform the user about the importance estimation and significance of features present within the data. This is useful, as it provides information regarding what features are necessary and what features are redundant when estimating SoC. Within this work, we used xAI and importance estimates to guide our modeling of NNs for EV SoC estimations. We utilized a local xAI method named InputXGradient [27] and a global importance estimate method named Pairwise Importance Estimate Extension (PIEE) [26]. We compared and verified the results from both methods to further understand the relative significance of the signals as well as the significance of their window size as input. As mentioned before, this is not commonly done in existing work of SoC estimation, as evidenced in Table 1. Additionally, studies that compare explanation of xAI and importance estimates are even more scarce. **xAI--InputXGradient**: This is an xAI method that is used to understand the influence of input features on a model's prediction. It takes the gradient of the output with respect to the input features, indicating how sensitive the prediction is to changes in each input feature. The gradient of each input feature is then multiplied by its respective input value to highlight which features have the highest influence on the model's prediction. InputXGradient was chosen because it is an intuitive local explainability approach, and its implementation can be readily found in Captum [55]. As the aim of this work is not a thorough walkthrough of the working of xAI methods, further information of InputXGradient can be found in [PERSON] et al. 's work [27]. **Importance estimate--PIEE**: This method utilizes an embedded pairwise layer to extract information for each feature from the input. This information is captured in the form of a profile, which can be pairwise weights focused or pairwise gradients focused. These profiles can be combined with statistical analysis to reach a relative estimate of feature importance. PIEE was chosen because of its stability and ease of implementation. It is a global importance estimate approach as opposed to the alternative, which is a local explainability approach. Again, as the aim of this work is not a thorough walkthrough of the working of xAI methods, further information of PIEE can be found in [PERSON] and [PERSON]'s work [26], and details of its implementation can be found on GitHub [56]. The experiment followed the setup below:  
**Dataset**: The dataset consisted of 269 sessions (265 single-labeled and 4 multi-labeled) recorded on e-Golf. Window segments of 20 min were used as input, with a time step interpolation of 1 s and a 30 s stride. This was the same as in Section 4.1. The signals used for SoC estimation varied depending on the investigation of feature importance. **Preprocessing**: Outlier removal and interpolation were applied to the dataset. Using MinMaxScaler, all the data, including the labels, were normalized to the range of 0 to 1. This was also the same as in Section 4.1. **Train, validation, test split**: Stratified session splitting was applied. There were a total of 296 sessions; the train set had 188 sessions, the validation set had 40 sessions, and the test set had 41 sessions. The same setting was used in Section 4.1. **Models**: The same models from Section 4.1 were used for feature importance analysis. **Training procedures**: Training followed from Section 4.1. The settings of this experiment were very similar if not the same as the setting of Section 4.1, as we needed a baseline setting in order to evaluate the effects of the xAI and feature importance estimate methods.