-
-
Save oegedijk/6ff115856b2a4ea69cf4b50b7b9b6989 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from explainerdashboard.custom import * | |
class CustomDashboard(ExplainerComponent): | |
def __init__(self, explainer, title="Custom Dashboard"): | |
super().__init__(explainer) | |
self.confusion = ConfusionMatrixComponent(explainer, | |
hide_selector=True, hide_percentage=True, cutoff=0.75) | |
self.contrib = ShapContributionsGraphComponent(explainer, | |
hide_selector=True, hide_depth=True, hide_sort=True) | |
def layout(self): | |
return dbc.Container([ | |
dbc.Row([ | |
dbc.Col([ | |
html.H1("Custom Demonstration:"), | |
html.H3("How to build your own layout by re-using ExplainerComponents.") | |
]) | |
]), | |
dbc.Row([ | |
dbc.Col([ | |
self.confusion.layout(), | |
]), | |
dbc.Col([ | |
self.contrib.layout(), | |
]) | |
]) | |
]) | |
ExplainerDashboard(explainer, CustomDashboard, hide_header=True).run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment