Zero-inflated and/or upper-censored Poisson / negative binomial distributions

[email protected] Fri, 08 Sep 2023 07:20:30 -0000
Newsgroups gmane.comp.python.scientific.devel
Message-ID <[email protected]>
Hi,

I'm a newbie regarding scipy development; I've been using scipy for many years, and I've implemented a zero-inflated and upper-censored variant of the Poisson and negative-binomial distributions, which we are using quite extensively. Those implementations inherit from rv_discrete.

In words, that distribution describes a zero-inflated and censored counting distribution of a random non-negative integer variable k, characterized by (uncensored and non-inflated) mean rate mu, (in case of negative binomial, by a dispersion parameter), an upper censoring threshold and zero-inflation probability. Note that "truncated" (cut beyond threshold & renormalized) is different from "censored" (map all values above threshold to threshold). For censoring, all probability mass for events with k > upper_censoring is concentrated at k=upper_censoring. We use this quite a lot for modelling time series in retail in which finite stocks (censoring) or occasional out-of-stock-situations (zero-inflation) occur. 

Since the detailed roadmap of scipy mentions "Implement additional widely used continuous and discrete probability distributions, e.g. mixture distributions.", I thought it might be interesting to add this to the discrete distributions? 

Please let me know what you think.
_______________________________________________
SciPy-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/scipy-dev.python.org/
Member address: [email protected]