@@ -80,7 +80,7 @@ def __init__(self, n, p, *args, **kwargs):
80
80
self .mode = tt .cast (tround (n * p ), self .dtype )
81
81
82
82
def random (self , point = None , size = None ):
83
- """
83
+ r """
84
84
Draw random values from Binomial distribution.
85
85
86
86
Parameters
@@ -102,7 +102,7 @@ def random(self, point=None, size=None):
102
102
size = size )
103
103
104
104
def logp (self , value ):
105
- """
105
+ r """
106
106
Calculate log-probability of Binomial distribution at specified value.
107
107
108
108
Parameters
@@ -215,7 +215,7 @@ def _random(self, alpha, beta, n, size=None):
215
215
return samples
216
216
217
217
def random (self , point = None , size = None ):
218
- """
218
+ r """
219
219
Draw random values from BetaBinomial distribution.
220
220
221
221
Parameters
@@ -238,7 +238,7 @@ def random(self, point=None, size=None):
238
238
size = size )
239
239
240
240
def logp (self , value ):
241
- """
241
+ r """
242
242
Calculate log-probability of BetaBinomial distribution at specified value.
243
243
244
244
Parameters
@@ -326,7 +326,7 @@ def __init__(self, p=None, logit_p=None, *args, **kwargs):
326
326
self .mode = tt .cast (tround (self .p ), 'int8' )
327
327
328
328
def random (self , point = None , size = None ):
329
- """
329
+ r """
330
330
Draw random values from Bernoulli distribution.
331
331
332
332
Parameters
@@ -348,7 +348,7 @@ def random(self, point=None, size=None):
348
348
size = size )
349
349
350
350
def logp (self , value ):
351
- """
351
+ r """
352
352
Calculate log-probability of Bernoulli distribution at specified value.
353
353
354
354
Parameters
@@ -427,7 +427,7 @@ def __init__(self, q, beta, *args, **kwargs):
427
427
self .median = self ._ppf (0.5 )
428
428
429
429
def logp (self , value ):
430
- """
430
+ r """
431
431
Calculate log-probability of DiscreteWeibull distribution at specified value.
432
432
433
433
Parameters
@@ -449,7 +449,7 @@ def logp(self, value):
449
449
0 < beta )
450
450
451
451
def _ppf (self , p ):
452
- """
452
+ r """
453
453
The percentile point function (the inverse of the cumulative
454
454
distribution function) of the discrete Weibull distribution.
455
455
"""
@@ -464,7 +464,7 @@ def _random(self, q, beta, size=None):
464
464
return np .ceil (np .power (np .log (1 - p ) / np .log (q ), 1. / beta )) - 1
465
465
466
466
def random (self , point = None , size = None ):
467
- """
467
+ r """
468
468
Draw random values from DiscreteWeibull distribution.
469
469
470
470
Parameters
@@ -547,7 +547,7 @@ def __init__(self, mu, *args, **kwargs):
547
547
self .mode = intX (tt .floor (mu ))
548
548
549
549
def random (self , point = None , size = None ):
550
- """
550
+ r """
551
551
Draw random values from Poisson distribution.
552
552
553
553
Parameters
@@ -569,7 +569,7 @@ def random(self, point=None, size=None):
569
569
size = size )
570
570
571
571
def logp (self , value ):
572
- """
572
+ r """
573
573
Calculate log-probability of Poisson distribution at specified value.
574
574
575
575
Parameters
@@ -656,7 +656,7 @@ def __init__(self, mu, alpha, *args, **kwargs):
656
656
self .mode = intX (tt .floor (mu ))
657
657
658
658
def random (self , point = None , size = None ):
659
- """
659
+ r """
660
660
Draw random values from NegativeBinomial distribution.
661
661
662
662
Parameters
@@ -680,7 +680,7 @@ def random(self, point=None, size=None):
680
680
return np .asarray (stats .poisson .rvs (g )).reshape (g .shape )
681
681
682
682
def _random (self , mu , alpha , size ):
683
- """ Wrapper around stats.gamma.rvs that converts NegativeBinomial's
683
+ r """ Wrapper around stats.gamma.rvs that converts NegativeBinomial's
684
684
parametrization to scipy.gamma. All parameter arrays should have
685
685
been broadcasted properly by generate_samples at this point and size is
686
686
the scipy.rvs representation.
@@ -692,7 +692,7 @@ def _random(self, mu, alpha, size):
692
692
)
693
693
694
694
def logp (self , value ):
695
- """
695
+ r """
696
696
Calculate log-probability of NegativeBinomial distribution at specified value.
697
697
698
698
Parameters
@@ -771,7 +771,7 @@ def __init__(self, p, *args, **kwargs):
771
771
self .mode = 1
772
772
773
773
def random (self , point = None , size = None ):
774
- """
774
+ r """
775
775
Draw random values from Geometric distribution.
776
776
777
777
Parameters
@@ -793,7 +793,7 @@ def random(self, point=None, size=None):
793
793
size = size )
794
794
795
795
def logp (self , value ):
796
- """
796
+ r """
797
797
Calculate log-probability of Geometric distribution at specified value.
798
798
799
799
Parameters
@@ -872,7 +872,7 @@ def _random(self, lower, upper, size=None):
872
872
return samples
873
873
874
874
def random (self , point = None , size = None ):
875
- """
875
+ r """
876
876
Draw random values from DiscreteUniform distribution.
877
877
878
878
Parameters
@@ -895,7 +895,7 @@ def random(self, point=None, size=None):
895
895
size = size )
896
896
897
897
def logp (self , value ):
898
- """
898
+ r """
899
899
Calculate log-probability of DiscreteUniform distribution at specified value.
900
900
901
901
Parameters
@@ -975,7 +975,7 @@ def __init__(self, p, *args, **kwargs):
975
975
self .mode = tt .squeeze (self .mode )
976
976
977
977
def random (self , point = None , size = None ):
978
- """
978
+ r """
979
979
Draw random values from Categorical distribution.
980
980
981
981
Parameters
@@ -1001,7 +1001,7 @@ def random(self, point=None, size=None):
1001
1001
size = size )
1002
1002
1003
1003
def logp (self , value ):
1004
- """
1004
+ r """
1005
1005
Calculate log-probability of Categorical distribution at specified value.
1006
1006
1007
1007
Parameters
@@ -1054,7 +1054,7 @@ def _repr_latex_(self, name=None, dist=None):
1054
1054
1055
1055
1056
1056
class Constant (Discrete ):
1057
- """
1057
+ r """
1058
1058
Constant log-likelihood.
1059
1059
1060
1060
Parameters
@@ -1070,7 +1070,7 @@ def __init__(self, c, *args, **kwargs):
1070
1070
self .mean = self .median = self .mode = self .c = c = tt .as_tensor_variable (c )
1071
1071
1072
1072
def random (self , point = None , size = None ):
1073
- """
1073
+ r """
1074
1074
Draw random values from Constant distribution.
1075
1075
1076
1076
Parameters
@@ -1096,7 +1096,7 @@ def _random(c, dtype=dtype, size=None):
1096
1096
size = size ).astype (dtype )
1097
1097
1098
1098
def logp (self , value ):
1099
- """
1099
+ r """
1100
1100
Calculate log-probability of Constant distribution at specified value.
1101
1101
1102
1102
Parameters
@@ -1180,7 +1180,7 @@ def __init__(self, psi, theta, *args, **kwargs):
1180
1180
self .mode = self .pois .mode
1181
1181
1182
1182
def random (self , point = None , size = None ):
1183
- """
1183
+ r """
1184
1184
Draw random values from ZeroInflatedPoisson distribution.
1185
1185
1186
1186
Parameters
@@ -1204,7 +1204,7 @@ def random(self, point=None, size=None):
1204
1204
return g * (np .random .random (g .shape ) < psi )
1205
1205
1206
1206
def logp (self , value ):
1207
- """
1207
+ r """
1208
1208
Calculate log-probability of ZeroInflatedPoisson distribution at specified value.
1209
1209
1210
1210
Parameters
@@ -1302,7 +1302,7 @@ def __init__(self, psi, n, p, *args, **kwargs):
1302
1302
self .mode = self .bin .mode
1303
1303
1304
1304
def random (self , point = None , size = None ):
1305
- """
1305
+ r """
1306
1306
Draw random values from ZeroInflatedBinomial distribution.
1307
1307
1308
1308
Parameters
@@ -1326,7 +1326,7 @@ def random(self, point=None, size=None):
1326
1326
return g * (np .random .random (g .shape ) < psi )
1327
1327
1328
1328
def logp (self , value ):
1329
- """
1329
+ r """
1330
1330
Calculate log-probability of ZeroInflatedBinomial distribution at specified value.
1331
1331
1332
1332
Parameters
@@ -1448,7 +1448,7 @@ def __init__(self, psi, mu, alpha, *args, **kwargs):
1448
1448
self .mode = self .nb .mode
1449
1449
1450
1450
def random (self , point = None , size = None ):
1451
- """
1451
+ r """
1452
1452
Draw random values from ZeroInflatedNegativeBinomial distribution.
1453
1453
1454
1454
Parameters
@@ -1478,7 +1478,7 @@ def random(self, point=None, size=None):
1478
1478
return stats .poisson .rvs (g ) * (np .random .random (g .shape ) < psi )
1479
1479
1480
1480
def _random (self , mu , alpha , size ):
1481
- """ Wrapper around stats.gamma.rvs that converts NegativeBinomial's
1481
+ r """ Wrapper around stats.gamma.rvs that converts NegativeBinomial's
1482
1482
parametrization to scipy.gamma. All parameter arrays should have
1483
1483
been broadcasted properly by generate_samples at this point and size is
1484
1484
the scipy.rvs representation.
@@ -1490,7 +1490,7 @@ def _random(self, mu, alpha, size):
1490
1490
)
1491
1491
1492
1492
def logp (self , value ):
1493
- """
1493
+ r """
1494
1494
Calculate log-probability of ZeroInflatedNegativeBinomial distribution at specified value.
1495
1495
1496
1496
Parameters
0 commit comments