From 817500b625f946395b9a28c833e3f0888577aa50 Mon Sep 17 00:00:00 2001 From: Felix Wick Date: Thu, 21 Sep 2023 16:58:07 +0200 Subject: [PATCH] how to call feature importances and contributions --- docs/source/tutorial.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/source/tutorial.md b/docs/source/tutorial.md index 0e40f49..0588f9d 100644 --- a/docs/source/tutorial.md +++ b/docs/source/tutorial.md @@ -128,4 +128,18 @@ CB_est = Pipeline([("binning", binner), ("CB", est)]) CB_est.fit(X_train, y) yhat = CB_est.predict(X_test) -``` \ No newline at end of file +``` + +## Feature Importances +To get a dictionary with the relative importances of the different model +features in the training: +```python +CB_est.get_feature_importances() +``` + +## Individual Explainability +To get a dictionary with the contributions of the different model features to +the individual predictions of a given data set: +```python +CB_est.get_feature_contributions(X_test) +```