Skip to content

Commit a7da870

Browse files
committed
add references
1 parent 747f615 commit a7da870

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

examples/BART/BART_introduction.ipynb

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@
445445
"source": [
446446
"From this plot we can see the main effect of each covariate on the predicted value. This is very useful we can recover complex relationship beyond monotonic increasing or decreasing effects. For example for the `hour` covariate we can see two peaks around 8 and and 17 hs and a minimum at midnight.\n",
447447
"\n",
448-
"When interpreting partial dependence plots we should be careful about the assumptions in this plot. First we are assuming variables are independent. For example when computing the effect of `hour` we have to marginalize the effect of `temperature` and this means that to compute the partial dependence value at `hour=0` we are including all observed values of temperature, and this may include temperatures that are actually not observed at midnight, given that lower temperatures are more likely than higher ones. We are seeing only averages, so if for a covariate half the values are positively associated with predicted variable and the other half negatively associated. The partial dependence plot will be flat as their contributions will cancel each other out. This is a problem that can be solved by using instead individual conditional expectation plots `pm.bart.plot_dependence(idata_bikes, kind=\"ice\")`. Notice that all this assumptions are assumptions of the partial dependence plot, not of our model! In fact BART can easily accommodate interaction of variables Although the prior in BART regularizes high order interactions). For more on interpreting Machine Learning model you could check this [book](https://christophm.github.io/interpretable-ml-book/).\n",
448+
"When interpreting partial dependence plots we should be careful about the assumptions in this plot. First we are assuming variables are independent. For example when computing the effect of `hour` we have to marginalize the effect of `temperature` and this means that to compute the partial dependence value at `hour=0` we are including all observed values of temperature, and this may include temperatures that are actually not observed at midnight, given that lower temperatures are more likely than higher ones. We are seeing only averages, so if for a covariate half the values are positively associated with predicted variable and the other half negatively associated. The partial dependence plot will be flat as their contributions will cancel each other out. This is a problem that can be solved by using instead individual conditional expectation plots `pm.bart.plot_dependence(idata_bikes, kind=\"ice\")`. Notice that all this assumptions are assumptions of the partial dependence plot, not of our model! In fact BART can easily accommodate interaction of variables Although the prior in BART regularizes high order interactions). For more on interpreting Machine Learning model you could check the \"Interpretable Machine Learning\" book {cite:p}`molnar2019`.\n",
449449
"\n",
450450
"Finally like with other regression method we should be careful that the effects we are seeing on individual variables are conditional on the inclusion of the other variables. So for example, while `humidity` seems to be mostly flat, meaning that this covariate has an small effect of the number of used bikes. This could be the case because `humidity` and `temperature` are correlated to some extend and once we include `temperature` in our model `humidity` does not provide too much information. Try for example fitting the model again but this time with `humidity` as the single covariate and then fitting the model again with `hour` as a single covariate. You should see that the result for this single-variate models will very similar to the previous figure for the `hour` covariate, but less similar for the `humidity` covariate."
451451
]
@@ -502,6 +502,21 @@
502502
"* Authored by Osvaldo Martin in Dec, 2021 ([pymc-examples#259](https://github.com/pymc-devs/pymc-examples/pull/259))"
503503
]
504504
},
505+
{
506+
"cell_type": "markdown",
507+
"id": "3c184bc8",
508+
"metadata": {},
509+
"source": [
510+
"## References\n",
511+
"\n",
512+
":::{bibliography}\n",
513+
":filter: docname in docnames\n",
514+
"\n",
515+
"martin2018bayesian\n",
516+
"martin2021bayesian\n",
517+
":::"
518+
]
519+
},
505520
{
506521
"cell_type": "markdown",
507522
"id": "2c557ed8",

examples/references.bib

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,13 @@ @book{martin2018bayesian
217217
publisher={Packt Publishing Ltd}
218218
}
219219

220+
@book{martin2021bayesian,
221+
title={Bayesian Modeling and Computation in Python},
222+
author={Martin, Osvaldo A and Kumar, Ravin and Lao, Junpeng},
223+
year={2021},
224+
publisher={Chapman and Hall/CRC},
225+
doi={10.1201/9781003019169}
226+
}
220227

221228
@book{mcelreath2018statistical,
222229
title={Statistical rethinking: A Bayesian course with examples in R and Stan},
@@ -245,6 +252,14 @@ @misc{mnih2013playing
245252
primaryClass={cs.LG}
246253
}
247254

255+
@book{molnar2019,
256+
title = {Interpretable Machine Learning},
257+
author = {Christoph Molnar},
258+
year = {2019},
259+
subtitle = {A Guide for Making Black Box Models Explainable},
260+
url={https://christophm.github.io/interpretable-ml-book/}
261+
}
262+
248263
@article{nowlan1992simplifying,
249264
title={Simplifying Neural Networks By Soft Weight-Sharing},
250265
author={Nowlan, Steven J and Hinton, Geoffrey E},

0 commit comments

Comments
 (0)