# Prediction of Students' Adaptability Using Explainable AI in Educational Machine Learning Models
## 3 Methodology
### Explainable Artificial Intelligence (XAI) Used
#### 3.5.2 LIME (Local Interpretable Model-Agnostic Explanations)  
LIME is a machine learning technique that provides an accurate and understandable explanation for the classification made by machine learning models [9]. LIME works by perturbing input data and observing changes in the model's predictions. It then selects the most influential features for a particular prediction and fits a simple model, such as a linear regression, to these features. LIME seeks to explain the reasoning behind a model's prediction y for an individual instance x by approximating the complex model f locally with an interpretable model g. This interpretable model, typically a linear model, operates on a binary feature representation z', which is derived from the original feature space of x. The local surrogate model is defined as:  
\[g\left(z\right)=\beta_{0}+\sum_{i=1}^{n}\beta_{i}z_{i}^{\prime} \tag{2}\]  
where \(g\left(z\right)\) represents the prediction of the interpretable model, \(\beta\_0\) is the intercept term of the linear model, \(\beta_{i}\) represents the weight associated with the \(i\)-th feature in the interpretable space, and \(z_{i}^{\prime}\) is the binary representation of the i-th feature. LIME aims to optimize the following objective function:  
\[\xi(x)=\underset{g\in G}{arg\text{min}}\mathcal{L}(f,g,\pi_{x})+\Omega(g) \tag{3}\]  
where \(\xi\)(x) is the local explanation for the instance x, \(\mathcal{L}\) measures the fidelity of \(g\) in approximating \(f\) within the locality defined by \(\pi_{x}\), \(\Omega(g)\) quantifies the complexity of the interpretable model \(g\), and \(G\) denotes the family of interpretable models, such as linear regressions or decision trees. Consider a machine learning model that predicts a student's adaptability level. For a particular student, the model predicts a \"High\" adaptability level. LIME is employed to explain this prediction, focusing on features like 'Class Duration', 'Financial Condition', and 'Institution Type', etc. Perturbing the input data around the student's features, LIME fits a local linear model to these perturbations to approximate the prediction of the original complex model \(f\). The linear model constructed by LIME provides the following coefficients for an interpretable explanation:  
Adaptability Score = 0.10 + 0.25 \(\times\) Class Duration \(-\) 0.15 \(\times\) Financial Condition + 0.10 \(\times\) Institution Type. An increase in 'Class Duration' by one unit (e.g., one hour) enhances the adaptability score by 0.25, suggesting the critical role of engagement time in educational adaptability. A decline in 'Financial Condition' from 'Mid' to 'Poor' (encoded as a decrease by one unit) reduces the adaptability score by 0.15, highlighting the potential barriers faced by economically disadvantaged students. A positive change in 'Institution Type' from 'Government' to 'Non-Government' (encoded as an increase from 0 to 1) raises the adaptability score by 0.10, possibly reflecting the influence of institutional resources and support. LIME explanation shows how each feature impacts the adaptability prediction. The positive coefficient for 'Class Duration' underscores the importance of classroom engagement in fostering adaptability, suggesting that longer classes may lead to better student outcomes. The negative coefficient for 'Financial Condition' points to the need for targeted support to students from less wealthy backgrounds. The positive coefficient for 'Non-Government' institutions indicates potential benefits of these environments, which may include innovative teaching methods or more personalized attention. Educational policymakers can leverage these insights to ensure that class time is used effectively, provide additional resources for students in need, and encourage beneficial practices observed in 'Non-Government' institutions. This approach proves especially valuable in domains where decisions are individual-specific, such as healthcare, education, and finance [27].