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.
Latihan ini adalah bagian dari kursus
Explainable AI in Python
Latihan interaktif praktis
Cobalah latihan ini dengan menyelesaikan kode contoh berikut.
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)