Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Oege Dijk authored and Oege Dijk committed Feb 21, 2020
2 parents f529d41 + 5c623f4 commit 81cdd78
Show file tree
Hide file tree
Showing 19 changed files with 3,494 additions and 93 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"python.pythonPath": "C:\\ProgramData\\Anaconda3\\envs\\ww_env2\\python.exe",
"python.pythonPath": "/anaconda/bin/python",
"python.testing.unittestArgs": [
"-v",
"-s",
Expand Down
12 changes: 7 additions & 5 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,20 @@
## Plots:
- add multiclass confusion matrix
- individual trees: highlight selected tree
- Add feature names to waterfall plot
- fix percentages difference bug lift plot vs classification plot

### Regression plots:

## Explainers:
- add `get_metrics_dict()` function

## Dashboard:
- add dependence plot to importances list
- Contributions: add div margin to index selector
- move number of features to display
- FIX NOT LOADING UNTIL CLICKED ON CONTRIBUTIONS TAB BUG!
- add option for vertical contributions?
- reformat contributions table
- add final prediction to contributions table
-

## Methods:

Expand All @@ -36,12 +39,11 @@


## Library level:
- fix forever updating bug (seems shadow tree related?)
- fix jupyter reload pdp bug
- submit pull request to dtreeviz to accept shadowtree as parameter
- just add shap='tree', 'linear', 'deep', etc instead of separate classes
- add long description to pypi: https://packaging.python.org/guides/making-a-pypi-friendly-readme/
- Add tests
- Add more tests!
- Test with lightgbm, catboost, extratrees
- turn all docstrings into sphynx compatible
- Fix numpy mock import in readthedocs compile
Expand Down
Binary file added assets/.DS_Store
Binary file not shown.
60 changes: 53 additions & 7 deletions dashboard_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@
},
{
"cell_type": "code",
<<<<<<< HEAD
"execution_count": 1,
=======
"execution_count": null,
>>>>>>> 5c623f400e54fea25a04f60bcc9229b0cc2a17d8
"metadata": {
"ExecuteTime": {
"end_time": "2019-11-06T13:04:08.094300Z",
"start_time": "2019-11-06T13:04:07.767281Z"
}
},
"collapsed": false
},
"outputs": [],
"source": [
Expand All @@ -24,12 +29,17 @@
},
{
"cell_type": "code",
<<<<<<< HEAD
"execution_count": 2,
=======
"execution_count": null,
>>>>>>> 5c623f400e54fea25a04f60bcc9229b0cc2a17d8
"metadata": {
"ExecuteTime": {
"end_time": "2019-11-06T13:04:25.772439Z",
"start_time": "2019-11-06T13:04:08.103302Z"
}
},
"collapsed": true
},
"outputs": [],
"source": [
Expand All @@ -41,11 +51,16 @@
},
{
"cell_type": "code",
<<<<<<< HEAD
"execution_count": 3,
=======
"execution_count": null,
>>>>>>> 5c623f400e54fea25a04f60bcc9229b0cc2a17d8
"metadata": {
"ExecuteTime": {
"start_time": "2019-11-06T13:03:59.697Z"
}
},
"collapsed": true
},
"outputs": [],
"source": [
Expand All @@ -63,12 +78,21 @@
},
{
"cell_type": "code",
<<<<<<< HEAD
"execution_count": 4,
=======
"execution_count": null,
>>>>>>> 5c623f400e54fea25a04f60bcc9229b0cc2a17d8
"metadata": {
"ExecuteTime": {
"end_time": "2019-11-06T13:03:52.617314Z",
"start_time": "2019-11-06T08:38:37.677784Z"
<<<<<<< HEAD
}
=======
},
"collapsed": false
>>>>>>> 5c623f400e54fea25a04f60bcc9229b0cc2a17d8
},
"outputs": [],
"source": [
Expand All @@ -86,6 +110,7 @@
},
{
"cell_type": "code",
<<<<<<< HEAD
"execution_count": 19,
"metadata": {},
"outputs": [
Expand All @@ -109,6 +134,13 @@
]
}
],
=======
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
>>>>>>> 5c623f400e54fea25a04f60bcc9229b0cc2a17d8
"source": [
"db = ExplainerDashboard(explainer,\n",
" model_summary=True,\n",
Expand All @@ -117,6 +149,7 @@
" shap_interaction=True,\n",
" shadow_trees=True)\n",
"db.run(8052)"
<<<<<<< HEAD
]
},
{
Expand All @@ -137,6 +170,8 @@
],
"source": [
"str(type(explainer.model)).endswith(\"RandomForestClassifier'>\")"
=======
>>>>>>> 5c623f400e54fea25a04f60bcc9229b0cc2a17d8
]
},
{
Expand All @@ -149,7 +184,13 @@
{
"cell_type": "code",
"execution_count": null,
<<<<<<< HEAD
"metadata": {},
=======
"metadata": {
"collapsed": true
},
>>>>>>> 5c623f400e54fea25a04f60bcc9229b0cc2a17d8
"outputs": [],
"source": [
"X_train, y_train, X_test, y_test = titanic_fare()\n",
Expand All @@ -166,7 +207,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"db = ExplainerDashboard(explainer,\n",
Expand All @@ -192,7 +235,8 @@
"ExecuteTime": {
"end_time": "2019-11-05T15:00:25.680557Z",
"start_time": "2019-11-05T12:20:30.468610Z"
}
},
"collapsed": true
},
"outputs": [],
"source": [
Expand All @@ -218,7 +262,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
Expand All @@ -239,7 +285,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.5"
"version": "3.6.9"
}
},
"nbformat": 4,
Expand Down
Binary file added explainerdashboard/.DS_Store
Binary file not shown.
Binary file added explainerdashboard/assets/favicon.ico
Binary file not shown.

0 comments on commit 81cdd78

Please sign in to comment.