Commit 5989b33
Add documentation on partial specification of a multivariate variable (#2239) (#1434)
Fixes the documentation *and* the behaviour side of
[TuringLang/Turing.jl#2239](TuringLang/Turing.jl#2239).
A variable drawn from a multivariate distribution in a single
tilde-statement (e.g. `x ~ MvNormal(...)`, `filldist`) is a **single**
random variable, not a collection of i.i.d. components. Supplying only
*part* of such a variable — via `predict` with a chain from a
differently sized model, or `fix`/`condition` on a subset of indices —
should produce an informative error.
---
**Update: (sunxd3)** scoped down to documentation only, per the
discussion below — the tilde-site guard, version bump, and error tests
are reverted; the docstring notes on whole-variable semantics for
`predict` and `fix` remain. The behaviour-side check for `predict` will
follow in a separate PR via `InitFromParams`; condition/fix enforcement
(if worth doing) will get its own design issue.
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Xianda Sun <sunxdt@gmail.com>1 parent d7e84ce commit 5989b33
2 files changed
Lines changed: 24 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
276 | 286 | | |
277 | 287 | | |
278 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
250 | | - | |
251 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
252 | 254 | | |
253 | 255 | | |
254 | 256 | | |
| |||
522 | 524 | | |
523 | 525 | | |
524 | 526 | | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
525 | 536 | | |
526 | 537 | | |
527 | 538 | | |
| |||
0 commit comments