BaşlayınÜcretsiz Başlayın

Feature Importance plots for admissions analysis

As part of the data science team at a university, your task is to evaluate which factors truly drive admissions decisions and which ones are less important. While the admissions committee knows CGPA plays a key role, they want to confirm this and uncover any other important factors that may influence outcomes. Using a RandomForestRegressor model, you'll visualize feature importance to clearly identify which aspects of applicants' profiles matter most and which have less of an impact on the decision process.

The shap library and the training data (X_train, y_train) have been pre-loaded for you.

Bu egzersiz

Explainable AI in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Derive the shap_values using a TreeExplainer.
  • Use the derived shap_values to plot the feature importances with a bar plot and analyze it.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

model = RandomForestRegressor(random_state=42)
model.fit(X_train, y_train)

# Derive shap values
explainer = ____
shap_values = ____

# Plot the feature importance plot
____
Kodu Düzenle ve Çalıştır