Feature exploration for supervised learning. Helps with feature understanding, identifying noisy features, feature debugging, leakage detection and model monitoring.
pip install featexp
featexp draws plots similar to partial dependence plots, but directly from data instead of using a trained model like current implementations of pdp do. Since it draws plots from data directly, it helps with understanding the features well and building better ML models.
from featexp import get_univariate_plots get_univariate_plots(data=data_train, target_col='target', data_test=data_test, features_list=['DAYS_EMPLOYED']) # data_test and features_list are optional. # Draws plots for all columns if features_list not passed # Draws only train data plots if no test_data passed
Returns mean target and population in each bin of a feature
from featexp import univariate_plotter binned_data_train, binned_data_test = univariate_plotter(data=data_train, target_col='target', feature='DAYS_EMPLOYED', data_test=data_test) # For only train data binned_data_train = univariate_plotter(data=data_train, target_col='target', feature='DAYS_EMPLOYED')
Returns trend changes and trend correlation for all features in a dataframe
from featexp import get_trend_stats_feature stats = get_trend_stats(data=data_train, target_col='target', data_test=data_test) # data_test is optional. If not passed, trend correlations aren't calculated.
It helps with identifying why a feature is leaky which helps with debugging.