Assessing impact with partial dependence plots
Building on your previous contributions, your next task is to explore how 'CGPA' and 'University Rating' influence admissions decisions. Our earlier analysis showed that 'CGPA' is the most important predictor, while 'University Rating' is the least important one. Using a partial dependence plot, we can see how changes in these features affect the probability of admission, giving the admissions committee nuanced insights into their impact.
X_train
and y_train
have been pre-loaded for you.
This exercise is part of the course
Explainable AI in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
from sklearn.ensemble import RandomForestRegressor
import shap
model = RandomForestRegressor(random_state=42)
model.fit(X_train, y_train)
# Generate the partial dependence plot for CGPA
shap.partial_dependence_plot(____, ____, X_train)