pymc-resources icon indicating copy to clipboard operation
pymc-resources copied to clipboard

PyMC educational resources

Results 45 pymc-resources issues
Sort by recently updated
recently updated
newest added
trafficstars

In: ```python # Code 4.2 trace_df = pm.trace_to_dataframe(trace_4_1) trace_df.cov() ``` I have ported part of this code to save the trace as an InferenceData object: ```python with pm.Model() as m4_1:...

Here's a first draft of the hierarchical model from Chapter 11. I could use some help with this: the results I get with PyMC3 show problems with the model (divergences)...

I would like to add this chapter to the main repository. There is one example in this chapter: - Example. Stratified sampling in pre-election polling. I have used pymc3 to...

`trace_to_dataframe()` in PyMC3 to save traces is currently implemented in Rethinking_2 notebooks (e.g. Chp_04). But the function is planned for deprecation, with Arviz being the intended package to save traces....

enhancement
good first issue

The notebooks in Rethinking_2 folder import pymc3 and not pymc this results in a missing module error. I tried to manually change the notebook Chap_02 to use pymc but then...

In code 5.19, it feels like the effect of marriage on divorce should be captured as follows: ```mu = pm.Deterministic("mu", a + bA * age_shared + bM * marriage)``` i.e.,...

Resources/Rethinking_2/Chp_04.ipynb block 4: sns.distplot(x[1:4, :], kde_kws={"bw": 0.01}, ax=ax[0], hist=False) sns.distplot(x[1:8, :], kde_kws={"bw": 0.01}, ax=ax[1], hist=False) sns.distplot(x[1:, :], kde_kws={"bw": 0.01}, ax=ax[2], hist=False) should be sns.distplot(x[4, :], kde_kws={"bw": 0.01}, ax=ax[0], hist=False) sns.distplot(x[8,...

Not sure it's a bug or not, got this error everytime. Might relate to this https://github.com/pymc-devs/pymc3/issues/3361 ? update 2/28/2021 comment out the following line in the above code block to...

When running it I get ``` File "", line 6 1 = np.ma.masked_values([18, 18, 16, 13, 9, 6, 4, 4, 4, -999, ^ SyntaxError: cannot assign to literal ``` indeed,...

In section 4.74, the following code block is used: ```python from patsy import dmatrix B = dmatrix( "bs(year, knots=knots, degree=3, include_intercept=True) -1", {"year": d2.year.values, "knots": knot_list[1:-1]}, ) ``` - I'm...