pymc3_quickstart_guide
pymc3_quickstart_guide copied to clipboard
For hierachical logistic regression why is mu_beta a single number and not a vector in the shape of self.num_pred
In the library the parent distribution mean value for the betas is a single number, but we can use a number of features for our model. Some of those features might have a positive effect and some might be negative, and I am wondering if it is correct to group them all under one mean value
Basically what you have written is:
mu_beta = pm.Normal('mu_beta', mu=0, sd=100)
sigma_beta = pm.HalfNormal('sigma_beta', sd=100)
And my thoughts are that it should be:
mu_beta = pm.Normal('mu_beta', mu=0, sd=100, shape=(self.num_pred,))
sigma_beta = pm.HalfNormal('sigma_beta', sd=100, shape=(self.num_pred,))
So instead of having a single mu_beta for all of the features, each feature has a unique mu_beta.
Let me know what your thoughts are on this.