Skip to content

Instantly share code, notes, and snippets.

@rkdgusrn1212
Created May 25, 2022 21:08
Show Gist options
  • Select an option

  • Save rkdgusrn1212/0d3f2c06e83860a25b5a2b8dede354b9 to your computer and use it in GitHub Desktop.

Select an option

Save rkdgusrn1212/0d3f2c06e83860a25b5a2b8dede354b9 to your computer and use it in GitHub Desktop.
Permutation Importance
import eli5
from eli5.sklearn import PermutationImportance
#model 이미 train이 끝난 모델
perm = PermutationImportance(model).fit(val_X, val_y)
#각 feature들의 weight를 출력
eli5.show_weights(perm, feature_names = val_X.columns.tolist())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment