@@ -154,6 +154,8 @@ def fn(a=UNSET):
154
154
# (pm.Exponential, 0, 1, {"lam": 1}, {}), PyMC Exponential gradient is failing miserably, need to figure out why
155
155
(pm .HalfNormal , 0 , 1 , {"sigma" : 1 }, {}),
156
156
(pm .Binomial , 0 , 8 , {"p" : 0.5 }, {"n" : 10 }),
157
+ (pm .Poisson , 1 , 15 , {"mu" : 10 }, {}),
158
+ (pm .Poisson , 19 , 41 , {"mu" : 30 }, {}),
157
159
],
158
160
)
159
161
@pytest .mark .parametrize ("mass" , [0.5 , 0.75 , 0.95 ])
@@ -185,26 +187,6 @@ def test_find_constrained_prior(distribution, lower, upper, init_guess, fixed_pa
185
187
(19 , 41 , {"mu" : 30 }),
186
188
],
187
189
)
188
- def test_constrained_prior_poisson (lower , upper , init_guess ):
189
- distribution = pm .Poisson
190
- mass = 0.95
191
- with pytest .warns (None ) as record :
192
- opt_params = pm .find_constrained_prior (
193
- distribution ,
194
- lower = lower ,
195
- upper = upper ,
196
- init_guess = init_guess ,
197
- )
198
- assert len (record ) == 0
199
-
200
- opt_distribution = distribution .dist (** opt_params )
201
- mass_in_interval = (
202
- pm .math .exp (pm .logcdf (opt_distribution , upper ))
203
- - pm .math .exp (pm .logcdf (opt_distribution , lower ))
204
- ).eval ()
205
- assert np .abs (mass_in_interval - mass ) <= 1e-2 # reduce to 1% tolerance for float32
206
-
207
-
208
190
@pytest .mark .parametrize (
209
191
"distribution, lower, upper, init_guess, fixed_params" ,
210
192
[
0 commit comments