Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with pm.Model() as hierarchical_model: | |
# global model parameters | |
α_μ_tmp = pm.Normal('α_μ_tmp', mu=0., sd=100) | |
α_σ_tmp = pm.HalfNormal('α_σ_tmp', 5.) | |
β_μ = pm.Normal('β_μ', mu=0., sd=100) | |
β_σ = pm.HalfNormal('β_σ', 5.) | |
# train type specific model parameters | |
α_tmp = pm.Normal('α_tmp', mu=α_μ_tmp, sd=α_σ_tmp, shape=n_train_types) | |
# Intercept for each train type, distributed around train type mean |