## 2 Fundamentals and Related Work
Riding dynamics were proven to be suitable predictors providing prediction accuracy of 75.5% (support vector machine) and 68.4%. Moreover, their research showed that the support vector machine outperformed the binary logistic regression by 7%. Explainable AI (XAI) enables the user to understand the inner process of a model [11]. The aim of XAI is to reveal how the input variables contribute to the overall output of the model. XAI is a post hoc approach that determines information from models that have already been trained [12]. According to [PERSON] and [PERSON] [11], there are four main reasons for using XAI: \"explain to justify\", \"explain to control\", \"explain to improve\" and \"explain to discover\". The main motivations for using XAI in transport are improving interpretability [10; 53], increasing trust [54], gaining understanding [53; 55] and transparency [56]. The knowledge gained can be used to improve a system or its usability [53; 55]. In transport, XAI has been applied to enhance sustainable transport exploring factors of electric vehicle usage [17], understanding travel mode choice [10] and improving the user experience of bike-sharing [19]. Another application domain of XAI is to increase trust in automated driving by explaining the vehicle's decision making process [54]. To prevent road traffic injuries, XAI has been used to identify risk factors for road traffic injuries [18]. SHAP is a popular XAI method that is theoretically founded through game theory [57]. SHAP belongs to the additive feature attribution methods and allows both local and global interpretation. A SHAP value corresponds to the average impact of a feature, calculated from different feature coalitions, on the model output. SHAP values are determined by an explanation model \(g(z^{\prime})\) that locally approximates the original ML model \(f(x)\). The explanation model is an interpretable model, which corresponds in its simplest form to a linear regression model:  
\[g(z^{\prime})=\phi_{0}+\sum_{j=1}^{M_{Fatt}}\phi_{j}z_{j}^{\prime}. \tag{1}\]  
The model parameters are \(\phi\in\mathbb{R}\) in Equation (1). The feature coalition subset that serves as input to the explanation model is displayed by \(z^{\prime}\in\left\{0,1\right\}^{M_{Fatt}}\) with \(M_{Fatt}\) corresponding to the number of features. A mapping function \(h_{x}(z^{\prime})\) transforms the entries of \(z^{\prime}\) into a valid ML model input, where ones are mapped to the original and zeros to averaged feature values. For each feature coalition subset, the parameters of the explanation model are tuned to minimise a weighted loss function. The loss function compares the model output of the explanation model with the original model. The loss function has the form  
\[L_{SHAP}(f,g,\pi_{x^{\prime}})=\sum_{z^{\prime}\in M_{Data}}[f(h_{x}(z^{\prime }))-g(z^{\prime})]^{2}\pi_{x^{\prime}}(z^{\prime}). \tag{2}\]  
Predictions are weighted with a weighting kernel \(\pi_{x^{\prime}}\) to evaluate the distance between the instance \(z^{\prime}\) and the original model input \(x^{\prime}_{i}\). By minimising the weighting kernel in the loss function, the resulting SHAP values, which are the parameters of the explanation function \(g(z^{\prime})\), are mathematically consistent. The local interpretation of the SHAP values explains the impact of a feature instance on a single prediction. By aggregating, i.e., averaging or summing, the SHAP values of all individual predictions, the contribution of a feature to the model output can be interpreted globally [58].