Skip to content

Commit

Permalink
Revise display of notebook examples in documentation
Browse files Browse the repository at this point in the history
This change aims at providing a better overview of the notebooks by displaying them as separate cards instead of a card carousel.

Other changes:
- Introductory examples and Real world-inspired examples are now more prominent with individual images and a grid layout by 2 per-row.
- All other examples are now in a grid layout with 3 examples per row.
- Clear outputs of some notebooks.
- Fix issue with rendering counterfactual example notebook.

Signed-off-by: Patrick Bloebaum <bloebp@amazon.com>
  • Loading branch information
bloebp committed Nov 15, 2023
1 parent 57656af commit 9d77022
Show file tree
Hide file tree
Showing 11 changed files with 162 additions and 330 deletions.
Binary file added docs/source/_static/401k-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/confounder-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/dowhy-econml-tutorial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/draw-samples.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/gcm-falsify-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 24 additions & 8 deletions docs/source/example_notebooks/gcm_basic_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "b72f7198",
"metadata": {},
"source": [
"# Basic Example for Graphical Causal Model-Based Intervention"
"# Basic Example for Graphical Causal Models"
]
},
{
Expand Down Expand Up @@ -60,7 +60,8 @@
"pycharm": {
"name": "#%% md\n"
}
}
},
"id": "7ec5357c05109df9"
},
{
"cell_type": "code",
Expand All @@ -80,7 +81,8 @@
"pycharm": {
"name": "#%%\n"
}
}
},
"id": "fe1b3eff33c5faf8"
},
{
"cell_type": "markdown",
Expand All @@ -98,7 +100,8 @@
"pycharm": {
"name": "#%% md\n"
}
}
},
"id": "54e59a824d7fc2d9"
},
{
"cell_type": "code",
Expand All @@ -112,7 +115,8 @@
"pycharm": {
"name": "#%%\n"
}
}
},
"id": "ced986f744d8e333"
},
{
"cell_type": "markdown",
Expand All @@ -137,7 +141,8 @@
"pycharm": {
"name": "#%%\n"
}
}
},
"id": "ae90eccaf892bb41"
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -210,7 +215,18 @@
"pycharm": {
"name": "#%% md\n"
}
}
},
"id": "68a94da68fba303e"
},
{
"cell_type": "markdown",
"source": [
"DoWhy offers a wide range of causal questions that can be answered with GCMs. See the user guide or other notebooks for more examples."
],
"metadata": {
"collapsed": false
},
"id": "1e7aed4828c843a9"
}
],
"metadata": {
Expand All @@ -234,4 +250,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"**NOTE**\n",
"It is important that the assigned functional causal models are invertible with respect to the noise (e.g. an additive noise model) for counterfactual statements. Alternatively, the user could also specify the ground truth models and ground truth noise.\n",
"---"
"It is important that the assigned functional causal models are invertible with respect to the noise (e.g. an additive noise model) for counterfactual statements. Alternatively, the user could also specify the ground truth models and ground truth noise."
]
},
{
Expand Down Expand Up @@ -283,7 +281,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.9.16"
}
},
"nbformat": 4,
Expand Down
284 changes: 28 additions & 256 deletions docs/source/example_notebooks/gcm_falsify_dag.ipynb

Large diffs are not rendered by default.

Loading

0 comments on commit 9d77022

Please sign in to comment.