BasisResearch / chirho

An experimental language for causal reasoning
https://basisresearch.github.io/chirho/getting_started.html
Apache License 2.0
168 stars 11 forks source link

Revise tutorial with broadcastable models and counterfactual indexing #533

Closed SamWitty closed 6 months ago

SamWitty commented 6 months ago

This PR revises our main tutorial to better demonstrate ChiRho's compatibility with tensor broadcasting and indexing counterfactual worlds using gather, IndexSet, and indices_of from chirho.indexed.ops.

In addition, this PR removes some lingering TODOs about making sure probabilistic inference is working as expected. I confirmed that SVI is working by adding a new visualization comparing ground_truth ATE to the posterior estimate. There are also some minor changes to phrasing throughout, see changes for detail.