# Prediction of Students' Adaptability Using Explainable AI in Educational Machine Learning Models
## 3 Methodology
### Explainable Artificial Intelligence (XAI) Used
#### 3.5.1 SHAP (Shapley Additive exPlanations)  
SHAP is a high-level machine learning interpretability method built on game theory concepts to explain the output of any machine learning technique. It was developed by [PERSON] and [PERSON] as a unifying approach to explaining the predictions of machine learning algorithms. The SHAP value measures the predictive influence of each feature on the base prediction. The base prediction is typically the average prediction of the dataset used to train the model [10]. The SHAP value for the i-th feature is calculated using the formula:  
\[\phi_{\text{i}}=\sum_{\mathcal{S}\subseteq\text{F}\backslash\{\text{i}\}} \frac{|\text{S}|!(|\text{F}|-|\text{S}|-1)!}{|\text{F}|!}[\text{F}_{\text{x}}( \text{S}\cup\{\text{i}\})-\text{f}_{\text{x}}(\text{S})] \tag{1}\]  
where \(\phi_{\text{i}}\) is the SHAP value for the i-th feature, \(S\) is a subset of all features \(F\) excluding the i-th feature, \(\text{f}_{\text{x}}(S)\) is the prediction made by the model using only the features in set \(S\), \(|S|\) is the number of features in set \(S\), and \(|F|\) is the total number of features. For example, consider a machine learning model that predicts student adaptability based on various features. Let us calculate the SHAP value for the feature 'Class Duration'. The base prediction (the average prediction of the training dataset) might have a 50% chance of a student being adaptable. If a particular student studies 5 h a day and this changes the prediction to 70% adaptability, the SHAP value for 'Class Duration' in this case would quantify how much of that 20% increase is attributed to studying 5 h specifically, \begin{table}
\begin{tabular}{c c c c} \hline \hline
**S/N** & **Model** & **Parameters** & **Values** \\ \hline \multirow{8}{*}{9} & \multirow{8}{*}{Ensemble} & Random Forest Classifier & \multirow{8}{*}{42} \\  & & random\_state & & \\  & & Gradient Boosting Classifier & & \\  & & random\_state & & \\  & & Logistic Regression & & \\  & & max\_iter & 1500 \\  & & random\_state & 42 \\  & & Ensemble method used & voting \\ \hline \multirow{2}{*}{10} & \multirow{8}{*}{AdaBoost} & Base Classifier & Decision Tree \\  & & max\_depth & 1 \\  & & n\_estimators & 50 \\  & & random\_state & 42 \\ \hline \multirow{8}{*}{11} & \multirow{8}{*}{CatBoost} & Iterations & 1500 \\  & & Depth & 6 \\  & & learning\_rate & 0.1 \\  & & verbose & 200 \\  & & random\_state & 42 \\  & & early\_stopping\_rounds & 50 \\ \hline \multirow{8}{*}{12} & \multirow{8}{*}{Neural Network} & Input Layer & X\_train\_stand \\  & & Activation Function & ReLU \\  & & First Hidden Layer: & \\  & & Units & 64 \\  & & Second Hidden Layer & \\  & & Units & 32 \\  & & Third Hidden Layer & \\  & & Units & 16 \\  & & Output Layer & \\  & & Units & 3 \\  & & Activation Function & Softmax \\ \hline \hline \end{tabular}
\end{table} 
Table 2: _Cont._compared to the average student. To apply this, one would calculate the difference in prediction with and without the 'Class Duration' feature over all possible combinations of other features, weighted by the number of features included. This exhaustive calculation considers all possible interactions with other features, thus allocating the 'Class Duration' feature its fair share of influence on the increase in adaptability prediction. The SHAP framework meets several desirable qualities, including consistency, missingness, and local accuracy, and it is model-agnostic, so any machine learning technique can adopt it [22; 23; 24; 25]. These characteristics guarantee the accuracy and dependability of SHAP explanations, which makes them especially useful in critical situations where interpretability is just as crucial as predictive performance. SHAP is used in many fields, such as energy to predict power consumption trends, healthcare to assess patient risk, and finance to evaluate credit risk. Its broad use highlights how crucial interpretability is to machine learning [24; 26].