My custom matplotlib stuff. I got inspired to do this by this blogpost and this PyData Talk.
This is very much a work in progress. See the gallery notebook for function calls, example data, etc.
Currently included:
adapted from
- Findling, C., Chopin, N., & Koechlin, E. (2020). Imprecise neural computations as a source of adaptive behaviour in volatile environments. Nature Human Behaviour. https://doi.org/10.1038/s41562-020-00971-z
Note that this is purely visual, and does not change the actual plotted data. I use it to better communicate if I set limits so that 0 is excluded from the range of values, but still want the axis origin to be labelled 0.
Basic, sampling based python implementation of the model selection procedure described in
- Stephan, K. E., Penny, W. D., Daunizeau, J., Moran, R. J., & Friston, K. J. (2009). Bayesian model selection for group studies. NeuroImage, 46(4), 1004–1017. https://doi.org/10.1016/j.neuroimage.2009.03.025
bmsResult = bms(L=L, cores=1)
The bmsResult
is a dictionary that contains a summary
of the MCMC chain, an array of exceedance probabilities xp
and an array of model rates r
.