Skip to content

Commit

Permalink
cleaned up docs
Browse files Browse the repository at this point in the history
  • Loading branch information
oegedijk committed Nov 3, 2020
1 parent 01a99e9 commit 22972df
Show file tree
Hide file tree
Showing 65 changed files with 589 additions and 257 deletions.
Binary file modified .DS_Store
Binary file not shown.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ You can install the package through pip:

## Screenshot

[![Dashboard Screenshot](https://i.postimg.cc/Gm8RnKVb/Screenshot-2020-07-01-at-13-25-19.png)](https://postimg.cc/PCj9mWd7)
![explainerdashboard.gif](explainerdashboard.gif)

<!-- [![Dashboard Screenshot](https://i.postimg.cc/Gm8RnKVb/Screenshot-2020-07-01-at-13-25-19.png)](https://postimg.cc/PCj9mWd7) -->

## Background

Expand Down
13 changes: 8 additions & 5 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
# Release Notes



## Version 0.2.9:
### Breaking Changes


### New Features
-
- You don't have to pass the list of subcomponents in `self.register_components()`
anymore: it will infer them automatically from `self.__dict__`.
-

### Bug Fixes
-
-

### Improvements
- ExplainerComponents now automatically store all parameters to attributes
- ExplainerComponents now automatically store all parameters to a ._stored_params dict
- ExplainerComponents now automatically stores all parameters to attributes
- ExplainerComponents now automatically stores all parameters to a ._stored_params dict
- ExplainerDashboard.to_yaml() now support instantiated tabs and stores parameters to yaml
- ExplainerDashboard.to_yaml() now stores the import requirments of subcomponents
- ExplainerDashboard.from_config() now instantiates tabs with stored parameters
- ExplainerDashboard.from_config() now imports classes of subcomponents

### Other Changes
-
-
- added docstrings to explainer_plots
- added screenshots of ExplainerComponents to docs

## Version 0.2.8:
### Breaking Changes
Expand Down
9 changes: 3 additions & 6 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
## Plots:
- add some of these:
https://towardsdatascience.com/introducing-shap-decision-plots-52ed3b4a1cba
- seperate standard shap plots for shap_interaction plots
- using some kind of inheritance

### Classifier plots:
- pdp: add multiclass option
Expand All @@ -31,7 +33,7 @@
## Dashboard:
- Add EDA style feature histograms, bar charts, correlation graphs, etc
- add cost calculator/optimizer for classifier models based on confusion matrix weights
- add group fairness metrics?
- add group fairness metrics

### Components
- add "experiment tracker" for what if...
Expand All @@ -52,11 +54,6 @@
- write tests for explainer_plots

## Docs:
- add gif to README
- add CLI documentation
- add docstrings to explainer_plots
- add screenshots of all ExplainerComponents to docs
- move screenshots to separate folder
- document PosLabelSelector and PosLabelConnector, e.g.:
self.connector = PosLabelConnector(self.roc_auc, self)
self.register_components(self.connector)
Expand Down
Binary file modified docs/.DS_Store
Binary file not shown.
Binary file modified docs/source/.DS_Store
Binary file not shown.
24 changes: 12 additions & 12 deletions docs/source/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
The library comes with a ``explainerdashboard`` command line tool (CLI) that
you can use to build and run explainerdashboards from your terminal.
This makes it easy to start a dashboard without having to run python code
or start a notebook first. Or you can use it to build explainer objects
or start a notebook first. You can use it to build explainer objects
as part of a CI/CD flow.

Run dashboard from stored explainer
===================================

In order to run a dashboard for a stored explainer from the commandline, \
In order to run a dashboard from a stored explainer from the commandline, \
we first need to store an explainer to disk. You can do this with::

explainer = ClassifierExplainer(model, X, y)
Expand Down Expand Up @@ -44,18 +44,18 @@ you can do so by storing the configuration to `.yaml`::

.. highlight:: bash

You can edit ``dashboard.yaml`` to make further configuration
changes. Then start the dashboard from the commandline with::
You can edit ``dashboard.yaml`` directly to make further configuration
changes if you wish. Start the dashboard from the commandline with::

$ explainerdashboard run dashboard.yaml

.. highlight:: python


Building explainer from explainer.yaml
======================================
Building explainers from explainer.yaml
=======================================

You can build explainers from the commandline by storing the model (e.g. ``model.pkl``)
You can build also explainers from the commandline by storing the model (e.g. ``model.pkl``)
and datafile (e.g. ``data.csv``), indicating which column is ``y`` (e.g. ``'Survival'``),
and which is the index (e.g. ``'Name'``), along with the other parameters
of the explainer.
Expand Down Expand Up @@ -84,13 +84,13 @@ This will load the model and dataset, construct an explainer, construct the
custom dashboard, calculate all properties needed for that specific dashboard,
and store the explainer to disk. This can be useful when you for example
would like to populate the dashboard with a new set of data: you can simply
update data.csv and run ``explainerdashboard build``. To start the dashboard
update ``data.csv`` and run ``explainerdashboard build``. To start the dashboard
you can then run::

$ explainerdashboard run dashboard.yaml

To build the explainer for a specific dashboard (other than the one
specified in dashboard_yaml, pass it as a second argument::
specified in ``dashboard_yaml``, pass it as a second argument::

$ explainerdashboard build explainer.yaml dashboard.yaml

Expand Down Expand Up @@ -119,16 +119,16 @@ Explainer.from_file()
.. automethod:: explainerdashboard.explainers.BaseExplainer.from_file

Explainer.to_yaml()
--------------------
-------------------

.. automethod:: explainerdashboard.explainers.BaseExplainer.to_yaml

ExplainerDashboard.to_yaml()
-------------------
----------------------------

.. automethod:: explainerdashboard.dashboards.ExplainerDashboard.to_yaml

ExplainerDashboard.from_config
-------------------
------------------------------

.. automethod:: explainerdashboard.dashboards.ExplainerDashboard.from_config
58 changes: 58 additions & 0 deletions docs/source/components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,20 @@ shap_components
ShapSummaryComponent
--------------------

.. image:: screenshots/components/shap_summary.png

.. image:: screenshots/components/shap_summary_detailed.png

.. autoclass:: explainerdashboard.dashboard_components.shap_components.ShapSummaryComponent
:members:

ShapDependenceComponent
-----------------------

.. image:: screenshots/components/shap_dependence.png

.. image:: screenshots/components/shap_dependence_cats.png

.. autoclass:: explainerdashboard.dashboard_components.shap_components.ShapDependenceComponent
:members:

Expand All @@ -87,12 +95,16 @@ ShapSummaryDependenceConnector
InteractionSummaryComponent
---------------------------

.. image:: screenshots/components/interaction_summary.png

.. autoclass:: explainerdashboard.dashboard_components.shap_components.InteractionSummaryComponent
:members:

InteractionDependenceComponent
------------------------------

.. image:: screenshots/components/shap_interaction.png

.. autoclass:: explainerdashboard.dashboard_components.shap_components.InteractionDependenceComponent
:members:

Expand All @@ -105,12 +117,17 @@ InteractionSummaryDependenceConnector
ShapContributionsTableComponent
-------------------------------


.. image:: screenshots/components/contribs_table.png

.. autoclass:: explainerdashboard.dashboard_components.shap_components.ShapContributionsTableComponent
:members:

ShapContributionsGraphComponent
-------------------------------

.. image:: screenshots/components/contribs_graph.png

.. autoclass:: explainerdashboard.dashboard_components.shap_components.ShapContributionsGraphComponent
:members:

Expand All @@ -122,24 +139,34 @@ overview_components
PredictionSummaryComponent
--------------------------

.. image:: screenshots/components/pred_summary_clas.png

.. image:: screenshots/components/pred_summary_reg.png

.. autoclass:: explainerdashboard.dashboard_components.overview_components.PredictionSummaryComponent
:members:

ImportancesComponent
--------------------

.. image:: screenshots/components/importances.png

.. autoclass:: explainerdashboard.dashboard_components.overview_components.ImportancesComponent
:members:

PdpComponent
------------

.. image:: screenshots/components/pdp.png

.. autoclass:: explainerdashboard.dashboard_components.overview_components.PdpComponent
:members:

WhatIfComponent
---------------

.. image:: screenshots/components/whatif.png

.. autoclass:: explainerdashboard.dashboard_components.overview_components.WhatIfComponent
:members:

Expand All @@ -152,42 +179,57 @@ classifier_components
ConfusionMatrixComponent
------------------------

.. image:: screenshots/components/confusion_matrix.png


.. autoclass:: explainerdashboard.dashboard_components.classifier_components.ConfusionMatrixComponent
:members:

LiftCurveComponent
------------------

.. image:: screenshots/components/lift_curve.png

.. autoclass:: explainerdashboard.dashboard_components.classifier_components.LiftCurveComponent
:members:

ClassificationComponent
-----------------------

.. image:: screenshots/components/classification.png

.. autoclass:: explainerdashboard.dashboard_components.classifier_components.ClassificationComponent
:members:

RocAucComponent
---------------

.. image:: screenshots/components/roc_auc.png

.. autoclass:: explainerdashboard.dashboard_components.classifier_components.RocAucComponent
:members:

PrAucComponent
--------------

.. image:: screenshots/components/pr_auc.png

.. autoclass:: explainerdashboard.dashboard_components.classifier_components.PrAucComponent
:members:

PrecisionComponent
------------------

.. image:: screenshots/components/precision.png

.. autoclass:: explainerdashboard.dashboard_components.classifier_components.PrecisionComponent
:members:

CumulativePrecisionComponent
----------------------------

.. image:: screenshots/components/cumulative_lift.png

.. autoclass:: explainerdashboard.dashboard_components.classifier_components.CumulativePrecisionComponent
:members:

Expand All @@ -198,18 +240,24 @@ regression_components
PredictedVsActualComponent
--------------------------

.. image:: screenshots/components/pred_vs_actual.png

.. autoclass:: explainerdashboard.dashboard_components.regression_components.PredictedVsActualComponent
:members:

ResidualsComponent
------------------

.. image:: screenshots/components/residuals.png

.. autoclass:: explainerdashboard.dashboard_components.regression_components.ResidualsComponent
:members:

ResidualsVsColComponent
-----------------------

.. image:: screenshots/components/residuals_vs_col.png

.. autoclass:: explainerdashboard.dashboard_components.regression_components.ResidualsVsColComponent
:members:

Expand All @@ -224,21 +272,31 @@ RegressionModelSummaryComponent
decisiontree_components
=======================



DecisionTreesComponent
----------------------

.. image:: screenshots/components/trees.png

.. image:: screenshots/components/xgb_trees.png

.. autoclass:: explainerdashboard.dashboard_components.decisiontree_components.DecisionTreesComponent
:members:

DecisionPathTableComponent
--------------------------

.. image:: screenshots/components/tree_table.png

.. autoclass:: explainerdashboard.dashboard_components.decisiontree_components.DecisionPathTableComponent
:members:

DecisionPathGraphComponent
--------------------------

.. image:: screenshots/components/tree_viz.png

.. autoclass:: explainerdashboard.dashboard_components.decisiontree_components.DecisionPathGraphComponent
:members:

Expand Down
7 changes: 7 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@
#
# html_sidebars = {}

from sphinx.builders.html import StandaloneHTMLBuilder
StandaloneHTMLBuilder.supported_image_types = [
'image/svg+xml',
'image/gif',
'image/png',
'image/jpeg'
]

# -- Options for HTMLHelp output ---------------------------------------------

Expand Down

0 comments on commit 22972df

Please sign in to comment.