IniziaInizia gratis

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.

Questo esercizio fa parte del corso

Explainable AI in Python

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

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)
Modifica ed esegui il codice