I am just recreating the custom Dashboard for Titanic for a Regression Model (same thing I wrote about in the last post).
However, using ClassifierRandomIndexComponent in class CustomPredictionsTab throws an error:
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in
----> 1 ExplainerDashboard(explainer, [CustomModelTab, CustomPredictionsTab], title='Stuff').run(port=8051)
c:\users...\venv\lib\site-packages\explainerdashboard\dashboards.py in init(self, explainer, tabs, title, hide_header, header_hide_title, header_hide_selector, block_selector_callbacks, pos_label, fluid, mode, width, height, external_stylesheets, server, url_base_pathname, responsive, logins, port, importances, model_summary, contributions, whatif, shap_dependence, shap_interaction, decision_trees, **kwargs)
414 block_selector_callbacks=block_selector_callbacks,
415 pos_label=pos_label,
--> 416 fluid=fluid, **kwargs)
417 else:
418 tabs = self._convert_str_tabs(tabs)
c:\users...\venv\lib\site-packages\explainerdashboard\dashboards.py in init(self, explainer, tabs, title, hide_title, hide_selector, block_selector_callbacks, pos_label, fluid, **kwargs)
110
111 self.selector = PosLabelSelector(explainer, pos_label=pos_label)
--> 112 self.tabs = [instantiate_component(tab, explainer, **kwargs) for tab in tabs]
113 assert len(self.tabs) > 0, 'When passing a list to tabs, need to pass at least one valid tab!'
114
c:\users...\venv\lib\site-packages\explainerdashboard\dashboards.py in (.0)
110
111 self.selector = PosLabelSelector(explainer, pos_label=pos_label)
--> 112 self.tabs = [instantiate_component(tab, explainer, **kwargs) for tab in tabs]
113 assert len(self.tabs) > 0, 'When passing a list to tabs, need to pass at least one valid tab!'
114
c:\users...\venv\lib\site-packages\explainerdashboard\dashboards.py in instantiate_component(component, explainer, **kwargs)
54
55 if inspect.isclass(component) and issubclass(component, ExplainerComponent):
---> 56 return component(explainer, **kwargs)
57 elif isinstance(component, ExplainerComponent):
58 return component
in init(self, explainer)
91 hide_slider=True, hide_labels=True,
92 hide_pred_or_perc=True,
---> 93 hide_selector=True, hide_button=False)
94
95 self.contributions = ShapContributionsGraphComponent(explainer,
c:\users...\venv\lib\site-packages\explainerdashboard\dashboard_components\connectors.py in init(self, explainer, title, name, hide_title, hide_index, hide_slider, hide_labels, hide_pred_or_perc, hide_selector, hide_button, pos_label, index, slider, labels, pred_or_perc, **kwargs)
65
66 if self.labels is None:
---> 67 self.labels = self.explainer.labels
68
69 if self.explainer.y_missing:
AttributeError: 'RegressionExplainer' object has no attribute 'labels'`
I'm slightly confused about that since it should be the same Component as on the vanilla "What if..." tab, which is working.
Anyway, is there a way to add the "What if..." Tab without e.g. the PDP-plot to the custom dashboard?