y0-causal-inference / y0

❓y0 (pronounced "why not?") is for causal inference in Python
https://y0.readthedocs.io
BSD 3-Clause "New" or "Revised" License
44 stars 9 forks source link

Update display of signs on variables in dsl #220

Closed cthoyt closed 4 months ago

cthoyt commented 4 months ago

@djinnome @callahanr this PR fixes some issues with the DSL in the way that it displays the status of variables. Most importantly, it now differentiates between star is None, star is True, and star is False for regular variables. This makes a pretty big simplification for counterfactual transport's inputs since you can directly say things like

-Infected @ +Vaccinated

instead of needing to have a 2-tuple

(Infected @ +Vaccinated, -Infected)

Note: this was already possible, but the DSL didn't show it correctly

This PR also fixes a few bugs in the way population probabilities are displayed