Don't Miss The Contents
Medium: https://medium.com/subscribe/@hasan.basri.akcay
LinkedIn: https://www.linkedin.com/in/hasan-basri-akcay
featimp
Feature importance for machine learning. Helps with feature understanding, calculating feature importances, feature debugging, and leakage detection.
Installation
pip install featimp
Using featimp
Detailed Medium post on using featimp.
There are a lot of feature importance techniques and each technique calculates different importance. Some of them are suitable for numerical to numerical importance, some of them are ideal for categorical to numerical significance and some of them are suitable for categorical to categorical importance. featimp automatically calculates feature importances and ranks them for you.
from featimp import get_feature_importances
fi_df = get_feature_importances(data=df_diabetes, num_features=num_features, cat_features=cat_features,
target='target_clf', task='clf_multiable', method='all')
fi_df.style.background_gradient(cmap=cm)
from featimp import get_fi_plots
_ = get_fi_plots(data=fi_df, x=['LGBM Imp.', 'LGBM Imp.'], y=['PI mean', 'ANOVA'])