Tuesday, 22 October 2019

🐼 ELI5 Library : A powerful library for Feature Engineering 🐼

ELI5 Library:

ELI5 is a Python package which helps us to debug machine learning classifiers & explain their predictions.
It provides support for the following machine learning frameworks & packages:

scikit-learn, XGBoost, LightGBM, CatBoost, lightning, sklearn-crfsuitekeras

Installation:









Implementation:


  • Building a sample model to find features which are more important:





  • Calculating weights & observing some important features using eli5 library:




  • Visualizing the important features:





  • Importance of features is decreasing as we move down the top of column.
  • Features showing in green indicates they are having positive impact on our prediction.
  • Features showing in white indicates they are having no impact on our prediction.
  • Most imp feature is var_81 here.

1 comment:

  1. Great example of xgboost explainability.

    I believe eli5 library is no longer maintained, a more modern approach is to use xgboost with lime for explainability.

    ReplyDelete