eli5.catboost
eli5 has CatBoost support - eli5.explain_weights()
shows feature importances,
The function works for CatBoost, CatBoostClassifier and CatBoostRegressor.
- explain_weights_catboost(catb, vec=None, top=20, importance_type='PredictionValuesChange', feature_names=None, pool=None)[source]
Return an explanation of an CatBoost estimator (CatBoostClassifier, CatBoost, CatBoostRegressor) as feature importances.
See
eli5.explain_weights()for description oftop,feature_names,feature_reandfeature_filterparameters.target_namesandtargetsparameters are ignored.- Parameters:
param ‘importance_type’ : str, optional – A way to get feature importance. Possible values are:
‘PredictionValuesChange’ (default) - The individual importance values for each of the input features.
‘LossFunctionChange’ - The individual importance values for each of the input features for ranking metrics (requires training data to be passed or a similar dataset with Pool)
param ‘pool’ : catboost.Pool, optional – To be passed if explain_weights_catboost has importance_type set to LossFunctionChange. The catboost feature_importances uses the Pool datatype to calculate the parameter for the specific importance_type.