Question about 'x' in pymc.invlogit(a+b*x)

fl rxjwg98 at gmail.com
Sat Mar 7 11:44:13 EST 2015


Hi,

I once learnt Python for a few weeks. Now, I try to using a Python package
pymc. It has the following example code:




import pymc
import numpy as np
n = 5*np.ones(4,dtype=int)
x = np.array([-.86,-.3,-.05,.73])
alpha = pymc.Normal('alpha',mu=0,tau=.01)
beta = pymc.Normal('beta',mu=0,tau=.01)
@pymc.deterministic
def theta(a=alpha, b=beta):
     """theta = logit^{-1}(a+b)"""
     return pymc.invlogit(a+b*x)



d = pymc.Binomial('d', n=n, p=theta, value=np.array([0.,1.,3.,5.]),\
observed=True)




I don't understand the 'x' in pymc.invlogit(a+b*x). Could you help me on it?


Thanks.



More information about the Python-list mailing list