GPs: Likelihoods for Zero-Inflated Count Data

Hi All,

Thanks for authoring a wonderful probabilistic programming language package. I was wondering if there any plans to add likelihoods for zero-inflated count data? E.g., ZIP (zero-inflated Poisson) and ZINB (zero-inflated negative binomial). Or is there a way to add custom likelihoods yourself?

Even if this means the means of inference becomes some sort of MCMC (e.g., HMC and its variants) it’d be a nice feature. PyMC3, btw, has ZIP support:

https://bwengals.github.io/gps-with-non-normal-likelihoods-in-pymc3.html

Many thanks ahead of time!

Hi, Pyro already has a zero-inflated Poisson distribution.

You should be able to implement additional zero-inflated distributions by forking the zero-inflated Poisson source code or by using pyro.distributions.MaskedMixture plus enumeration as in the observation distributions in the mixed-effect HMM example model.

1 Like

Thanks! Can this be used as a likelihood with a latent GP for the rate function and/or the probability of non-zero observations?

Yes, you should be able to fork the contrib.gp Poisson likelihood source code to use ZeroInflatedPoisson instead and use that new likelihood with the rest of the tools in pyro.contrib.gp.

1 Like