Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing typos in infer.inspect #3198

Merged
merged 1 commit into from
Apr 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pyro/infer/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def get_dependencies(
linearly many dependencies as in independent sets of parallel edges.
Prior dependencies follow the original model order.
- `posterior_dependencies` is a similar dict, but mapping latent
variables to the latent or observed sits on which they depend in the
variables to the latent or observed sites on which they depend in the
posterior. Posterior dependencies are reversed from the model order.

Dependencies elide ``pyro.deterministic`` sites and ``pyro.sample(...,
Expand All @@ -117,7 +117,7 @@ def model_1():

Here is an example where two variables ``a`` and ``b`` start out
conditionally independent in the prior, but become conditionally dependent
in the posterior do the so-called collider variable ``c`` on which they
in the posterior to the so-called collider variable ``c`` on which they
both depend. This is called "moralization" in the graphical model
literature::

Expand All @@ -143,8 +143,8 @@ def model_2():

Dependencies can be more complex in the presence of plates. So far all the
dict values have been empty sets of plates, but in the following posterior
we see that ``c`` depends on itself across the plate ``p``. This means
that, among the elements of ``c``, e.g. ``c[0]`` depends on ``c[1]`` (this
we see that ``a`` depends on itself across the plate ``p``. This means
that, among the elements of ``a``, e.g. ``a[0]`` depends on ``a[1]`` (this
is why we explicitly allow variables to depend on themselves)::

def model_3():
Expand Down