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: docs/source/glossary.md
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -132,5 +132,26 @@ tensor_like
132
132
133
133
pt.as_tensor_variable([[1, 2.0], [0, 0]])
134
134
```
135
+
unnamed_distribution
136
+
PyMC distributions can be initialized directly (e.g. `pm.Normal`) or using the `.dist` classmethod (e.g. `pm.Normal.dist`). Distributions initialized with the 1st method are registered as model parameters and thus, need to be given a name and be initialized within a model context. "unnamed_distributions" are distributions initialized with the 2nd method. These are standalone distributions, they are not parameters in any model and can be used to draw samples from a distribution by itself or as parameters to other distributions like mixtures or censored.
137
+
138
+
"unnamed_distributions" can be used outside the model context. For example:
139
+
140
+
```{jupyter-execute}
141
+
import pymc as pm
142
+
143
+
unnamed_dist = pm.Normal.dist(mu=1, sigma=2)
144
+
pm.draw(unnamed_dist, draws=10)
145
+
```
146
+
147
+
Trying to initialize a named distribution outside a model context raises a `TypeError`:
0 commit comments