Bayesian 使用马尔可夫链蒙特卡罗为混合连续和二元预测值定义先验,以运行贝叶斯线性回归

Bayesian 使用马尔可夫链蒙特卡罗为混合连续和二元预测值定义先验,以运行贝叶斯线性回归,bayesian,montecarlo,pymc3,markov-chains,probabilistic-programming,Bayesian,Montecarlo,Pymc3,Markov Chains,Probabilistic Programming,我试图在PyMC3中使用马尔可夫链蒙特卡罗运行贝叶斯线性回归。我试图为我的问题设置优先级,我的回答是一个连续变量,我有12个预测值(8个二进制和4个连续)。如何定义此问题的优先级 我尝试将先验设置为8个二项分布和4个连续变量,但我无法以正确的方式构建方程 我检查了pymc3中的以下代码 # Context for the model with pm.Model() as normal_model: # The prior for the model parameters will be

我试图在PyMC3中使用马尔可夫链蒙特卡罗运行贝叶斯线性回归。我试图为我的问题设置优先级,我的回答是一个连续变量,我有12个预测值(8个二进制和4个连续)。如何定义此问题的优先级

我尝试将先验设置为8个二项分布和4个连续变量,但我无法以正确的方式构建方程

我检查了pymc3中的以下代码

# 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()

   # Creating the model requires a formula and data (and optionally a family)
   pm.GLM.from_formula(formula, data = X_train, family = family)

   # Perform Markov Chain Monte Carlo sampling
   normal_trace = pm.sample(draws=2000, chains = 2, tune = 500, njobs=-1)
在上述代码中,是否将所有参数的“family=pm.glm.families.Normal()”设置为平均值为零且sd=1的正态分布?对于8个二项变量和4个连续变量,我们如何更改此代码以声明Previor