From 98dbbb93c7d15cbd9cce4b33d71e194a358add75 Mon Sep 17 00:00:00 2001 From: Oege Dijk Date: Tue, 12 Jan 2021 14:23:29 +0100 Subject: [PATCH] fixes convert_str_tabs --- RELEASE_NOTES.md | 2 +- explainerdashboard/dashboards.py | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index eeb9b15..1b118c6 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -16,7 +16,7 @@ and how to sort the categories (alphabetical, by frequency or by mean abs shap) ### Bug Fixes -- +- fixes bug where str tab indicators returned e.g. the old ImportancesTab instead of ImportancesComposite - ### Improvements diff --git a/explainerdashboard/dashboards.py b/explainerdashboard/dashboards.py index f574d80..2a7c9c5 100644 --- a/explainerdashboard/dashboards.py +++ b/explainerdashboard/dashboards.py @@ -658,19 +658,22 @@ def _store_params(self, no_store=None, no_attr=None, no_param=None): def _convert_str_tabs(self, component): if isinstance(component, str): if component == 'importances': - return ImportancesTab + return ImportancesComposite elif component == 'model_summary': - return ModelSummaryTab + if self.explainer.is_classifier: + return ClassifierModelStatsComposite + else: + return RegressionModelStatsComposite elif component == 'contributions': - return ContributionsTab + return IndividualPredictionsComposite elif component == 'whatif': - return WhatIfTab + return WhatIfComposite elif component == 'shap_dependence': - return ShapDependenceTab + return ShapDependenceComposite elif component == 'shap_interaction': - return ShapInteractionsTab + return ShapInteractionsComposite elif component == 'decision_trees': - return DecisionTreesTab + return DecisionTreesComposite return component @staticmethod