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
Copy file name to clipboardExpand all lines: conjugate/distributions.py
+28-6Lines changed: 28 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
"""These are the supported distributions based on the conjugate models.
2
2
3
-
Many have the `dist` attribute which is a <a href=https://docs.scipy.org/doc/scipy/reference/stats.html>scipy.stats distribution</a> object. From there,
3
+
Many have the `dist` attribute which is a <a href=https://docs.scipy.org/doc/scipy/reference/stats.html>scipy.stats distribution</a> object. From there,
4
4
you can use the methods from scipy.stats to get the pdf, cdf, etc.
5
5
6
6
Distributions can be plotted using the `plot_pmf` or `plot_pdf` methods of the distribution.
7
7
8
-
```python
9
-
from conjugate.distribution import Beta
8
+
```python
9
+
from conjugate.distribution import Beta
10
10
11
11
beta = Beta(1, 1)
12
-
scipy_dist = beta.dist
12
+
scipy_dist = beta.dist
13
13
14
14
print(scipy_dist.mean())
15
15
# 0.5
@@ -21,9 +21,9 @@
21
21
beta.plot_pmf(label="beta distribution")
22
22
```
23
23
24
-
Distributions like Poisson can be added with other Poissons or multiplied by numerical values in order to scale rate. For instance,
24
+
Distributions like Poisson can be added with other Poissons or multiplied by numerical values in order to scale rate. For instance,
0 commit comments