Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Context for the model
with pm.Model() as normal_model:
# The prior for the model parameters will be a normal distribution
family = pm.glm.families.Normal()
# Making the model only requires specifying the formula and the data
pm.GLM.from_formula(formula, X_train_math, family = family)
# Perform Markov Chain Monte Carlo sampling
normal_trace = pm.sample(draws=2000, tune = 500, njobs=-1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment