@@ -1137,13 +1137,17 @@ def test_beta(self):
1137
1137
{"alpha" : Rplus , "beta" : Rplus },
1138
1138
lambda value , alpha , beta : sp .beta .logpdf (value , alpha , beta ),
1139
1139
)
1140
- self .check_logp (Beta , Unit , {"mu" : Unit , "sigma" : Rplus }, beta_mu_sigma )
1140
+ self .check_logp (
1141
+ Beta ,
1142
+ Unit ,
1143
+ {"mu" : Unit , "sigma" : Rplus },
1144
+ beta_mu_sigma ,
1145
+ )
1141
1146
self .check_logcdf (
1142
1147
Beta ,
1143
1148
Unit ,
1144
1149
{"alpha" : Rplus , "beta" : Rplus },
1145
1150
lambda value , alpha , beta : sp .beta .logcdf (value , alpha , beta ),
1146
- n_samples = 10 ,
1147
1151
decimal = select_by_precision (float64 = 5 , float32 = 3 ),
1148
1152
)
1149
1153
@@ -1266,20 +1270,17 @@ def scipy_mu_alpha_logcdf(value, mu, alpha):
1266
1270
Nat ,
1267
1271
{"mu" : Rplus , "alpha" : Rplus },
1268
1272
scipy_mu_alpha_logcdf ,
1269
- n_samples = 5 ,
1270
1273
)
1271
1274
self .check_logcdf (
1272
1275
NegativeBinomial ,
1273
1276
Nat ,
1274
1277
{"p" : Unit , "n" : Rplus },
1275
1278
lambda value , p , n : sp .nbinom .logcdf (value , n , p ),
1276
- n_samples = 5 ,
1277
1279
)
1278
1280
self .check_selfconsistency_discrete_logcdf (
1279
1281
NegativeBinomial ,
1280
1282
Nat ,
1281
1283
{"mu" : Rplus , "alpha" : Rplus },
1282
- n_samples = 10 ,
1283
1284
)
1284
1285
1285
1286
@pytest .mark .xfail (reason = "Distribution not refactored yet" )
@@ -1338,7 +1339,6 @@ def test_lognormal(self):
1338
1339
Rplus ,
1339
1340
{"mu" : R , "sigma" : Rplusbig },
1340
1341
lambda value , mu , sigma : floatX (sp .lognorm .logpdf (value , sigma , 0 , np .exp (mu ))),
1341
- n_samples = 5 , # Just testing alternative parametrization
1342
1342
)
1343
1343
self .check_logcdf (
1344
1344
Lognormal ,
@@ -1351,7 +1351,6 @@ def test_lognormal(self):
1351
1351
Rplus ,
1352
1352
{"mu" : R , "sigma" : Rplusbig },
1353
1353
lambda value , mu , sigma : sp .lognorm .logcdf (value , sigma , 0 , np .exp (mu )),
1354
- n_samples = 5 , # Just testing alternative parametrization
1355
1354
)
1356
1355
1357
1356
def test_t (self ):
@@ -1366,21 +1365,18 @@ def test_t(self):
1366
1365
R ,
1367
1366
{"nu" : Rplus , "mu" : R , "sigma" : Rplus },
1368
1367
lambda value , nu , mu , sigma : sp .t .logpdf (value , nu , mu , sigma ),
1369
- n_samples = 5 , # Just testing alternative parametrization
1370
1368
)
1371
1369
self .check_logcdf (
1372
1370
StudentT ,
1373
1371
R ,
1374
1372
{"nu" : Rplus , "mu" : R , "lam" : Rplus },
1375
1373
lambda value , nu , mu , lam : sp .t .logcdf (value , nu , mu , lam ** - 0.5 ),
1376
- n_samples = 10 , # relies on slow incomplete beta
1377
1374
)
1378
1375
self .check_logcdf (
1379
1376
StudentT ,
1380
1377
R ,
1381
1378
{"nu" : Rplus , "mu" : R , "sigma" : Rplus },
1382
1379
lambda value , nu , mu , sigma : sp .t .logcdf (value , nu , mu , sigma ),
1383
- n_samples = 5 , # Just testing alternative parametrization
1384
1380
)
1385
1381
1386
1382
def test_cauchy (self ):
@@ -1557,13 +1553,11 @@ def test_binomial(self):
1557
1553
Nat ,
1558
1554
{"n" : NatSmall , "p" : Unit },
1559
1555
lambda value , n , p : sp .binom .logcdf (value , n , p ),
1560
- n_samples = 10 ,
1561
1556
)
1562
1557
self .check_selfconsistency_discrete_logcdf (
1563
1558
Binomial ,
1564
1559
Nat ,
1565
1560
{"n" : NatSmall , "p" : Unit },
1566
- n_samples = 10 ,
1567
1561
)
1568
1562
1569
1563
@pytest .mark .xfail (reason = "checkd tests has not been refactored" )
@@ -1766,14 +1760,12 @@ def logcdf_fn(value, psi, mu, alpha):
1766
1760
Nat ,
1767
1761
{"psi" : Unit , "mu" : Rplusbig , "alpha" : Rplusbig },
1768
1762
logcdf_fn ,
1769
- n_samples = 10 ,
1770
1763
)
1771
1764
1772
1765
self .check_selfconsistency_discrete_logcdf (
1773
1766
ZeroInflatedNegativeBinomial ,
1774
1767
Nat ,
1775
1768
{"psi" : Unit , "mu" : Rplusbig , "alpha" : Rplusbig },
1776
- n_samples = 10 ,
1777
1769
)
1778
1770
1779
1771
@pytest .mark .xfail (reason = "Test not refactored yet" )
@@ -1806,14 +1798,12 @@ def logcdf_fn(value, psi, n, p):
1806
1798
Nat ,
1807
1799
{"psi" : Unit , "n" : NatSmall , "p" : Unit },
1808
1800
logcdf_fn ,
1809
- n_samples = 10 ,
1810
1801
)
1811
1802
1812
1803
self .check_selfconsistency_discrete_logcdf (
1813
1804
ZeroInflatedBinomial ,
1814
1805
Nat ,
1815
1806
{"n" : NatSmall , "p" : Unit , "psi" : Unit },
1816
- n_samples = 10 ,
1817
1807
)
1818
1808
1819
1809
@pytest .mark .parametrize ("n" , [1 , 2 , 3 ])
0 commit comments