I was going through Bill Engels zero-inflated Poisson Likelihood GP example here:
I see the following code:
with pm.Model() as model: ℓ = pm.Gamma("ℓ", alpha=2, beta=2) cov = pm.gp.cov.ExpQuad(1, ℓ) c = pm.Gamma("c", alpha=2, beta=1) mu = pm.gp.mean.Constant(c) f = pm.gp.GP("f", X=x[:,None], mean_func=mu, cov_func=cov) p = pm.Beta("p", alpha=1, beta=1) likelihood = pm.ZeroInflatedPoisson("likelihood", psi=p, theta=tt.exp(f), observed=y) tr = pm.sample(2000)
Forgive me if this is obvious, but
pm.gp.GP doesn’t seem to be anything that exists in the PyMC3 version I just installed. What is the correct format expected here?
I presume you specify a gp with
gp = pm.gp.Latent(mean_func=mu, cov_func=cov) and then use
f = gp.prior("f", X=x[:,None]). Is this correct? Thanks in advance!