You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passing the max_n_steps parameter as a kwarg to pm.HurdleNegativeBinomial, a mixture distribution that involves a Truncated part, raised a TypeError indicating that it is not successfully passed to the Truncated part somehow.
Reproduceable code example:
importpymcaspmimportpytensorasptwithpm.Model():
ad_nb=pm.HurdleNegativeBinomial('ad_nb', psi=.1, n=4000, p=1-5.8*1e-5, max_n_steps=10000)
prior=pm.sample_prior_predictive(samples=100)
# while the following hand-made mixture worksnonzero_p=.1withpm.Model():
nonzero_p=pt.as_tensor_variable(nonzero_p)
weights=pt.stack([1-nonzero_p, nonzero_p], axis=-1)
comp_dists= [
pm.DiracDelta.dist(0),
pm.Truncated.dist(pm.NegativeBinomial.dist(p=1-6*1e-5, n=4000), lower=1, max_n_steps=10000),
]
pm.Mixture('ads', weights, comp_dists)
prior=pm.sample_prior_predictive(samples=100)
I'm not sure if it's not just something wrong with HurdleNegativeBinomial/max_n_steps, or possibly something deeper affecting Hurdle models in general. It could be a hurdle for people relying on using Hurdle models, which to me is a key feature of PyMC compared to other tools.
The text was updated successfully, but these errors were encountered:
Describe the issue:
Passing the max_n_steps parameter as a kwarg to pm.HurdleNegativeBinomial, a mixture distribution that involves a Truncated part, raised a TypeError indicating that it is not successfully passed to the Truncated part somehow.
Reproduceable code example:
Error message:
PyMC version information:
pymc==5.11.0
pytensor==2.18.6
MacOS Sonoma 14.4.1
Installation: conda
Context for the issue:
I'm not sure if it's not just something wrong with HurdleNegativeBinomial/max_n_steps, or possibly something deeper affecting Hurdle models in general. It could be a hurdle for people relying on using Hurdle models, which to me is a key feature of PyMC compared to other tools.
The text was updated successfully, but these errors were encountered: