Skip to content

Commit

Permalink
fixes convert_str_tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
oegedijk committed Jan 12, 2021
1 parent fb652a7 commit 98dbbb9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 10 additions & 7 deletions explainerdashboard/dashboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 98dbbb9

Please sign in to comment.