You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publisher = {Technical report. Retrieved from https://mc-stan. org/users/docum entat ion~\ldots{}}
50
50
}
51
+
@article{collinswilson2019,
52
+
title = {Ten simple rules for the computational modeling of behavioral data},
53
+
author = {Wilson, Robert C and Collins, Anne GE},
54
+
editor = {Behrens, Timothy E},
55
+
volume = 8,
56
+
year = 2019,
57
+
month = {nov},
58
+
pub_date = {2019-11-26},
59
+
pages = {e49547},
60
+
citation = {eLife 2019;8:e49547},
61
+
doi = {10.7554/eLife.49547},
62
+
abstract = {Computational modeling of behavior has revolutionized psychology and neuroscience. By fitting models to experimental data we can probe the algorithms underlying behavior, find neural correlates of computational variables and better understand the effects of drugs, illness and interventions. But with great power comes great responsibility. Here, we offer ten simple rules to ensure that computational modeling is used with care and yields meaningful insights. In particular, we present a beginner-friendly, pragmatic and details-oriented introduction on how to relate models to data. What, exactly, can a model tell us about the mind? To answer this, we apply our rules to the simplest modeling techniques most accessible to beginning modelers and illustrate them with examples and code available online. However, most rules apply to more advanced techniques. Our hope is that by following our guidelines, researchers will avoid many pitfalls and unleash the power of computational modeling on their own data.},
63
+
keywords = {computational modeling, model fitting, validation, reproducibility},
64
+
journal = {eLife},
65
+
issn = {2050-084X},
66
+
publisher = {eLife Sciences Publications, Ltd}
67
+
}
51
68
@article{efron1975data,
52
69
title = {Data analysis using Stein's estimator and its generalizations},
53
70
author = {Efron, Bradley and Morris, Carl},
@@ -156,6 +173,16 @@ @book{hayes2017introduction
156
173
year = {2017},
157
174
publisher = {Guilford publications}
158
175
}
176
+
@article{hoffman2014nuts,
177
+
title = {The No-U-Turn Sampler: Adaptively Setting Path Lengths in Hamiltonian Monte Carlo},
@@ -113,7 +113,7 @@ In the previous plot the white line is the median over 4000 posterior draws, and
113
113
The following figure shows two samples from the posterior of $\mu$. We can see that these functions are not smooth. This is fine and is a direct consequence of using regression trees. Trees can be seen as a way to represent stepwise functions, and a sum of stepwise functions is just another stepwise function. Thus, when using BART we just need to know that we are assuming that a stepwise function is a good enough approximation for our problem. In practice this is often the case because we sum over many trees, usually values like 50, 100 or 200. Additionally, we often average over the posterior distribution. All this makes the "steps smoother", even when we never really have an smooth function as for example with Gaussian processes (splines). A nice theoretical result, tells us that in the limit of $m \to \infty$ the BART prior converges to a [nowheredifferentiable](https://en.wikipedia.org/wiki/Weierstrass_function) Gaussian process.
To gain further intuition the next figures show 3 of the `m` trees. As we can see these are definitely not very good approximators by themselves. inspecting individuals trees is generally not necessary. We are just showing them here to generate intuition about BART.
@@ -143,7 +143,7 @@ Y = bikes["count"]
143
143
```{code-cell} ipython3
144
144
with pm.Model() as model_bikes:
145
145
σ = pm.HalfNormal("σ", Y.std())
146
-
μ = pmx.BART("μ", X, Y, m=50)
146
+
μ = pmb.BART("μ", X, Y, m=50)
147
147
y = pm.Normal("y", μ, σ, observed=Y)
148
148
idata_bikes = pm.sample(random_seed=RANDOM_SEED)
149
149
```
@@ -155,7 +155,7 @@ with pm.Model() as model_bikes:
155
155
To help us interpret the results of our model we are going to use partial dependence plot. This is a type of plot that shows the marginal effect that one covariate has on the predicted variable. That is, what is the effect that a covariate $X_i$ has of $Y$ while we average over all the other covariates ($X_j, \forall j \not = i$). This type of plot are not exclusive of BART. But they are often used in the BART literature. PyMC provides an utility function to make this plot from the inference data.
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.
@@ -176,12 +176,13 @@ Additionally, we provide a novel method to assess the variable importance. You c
0 commit comments