Notebook’s tools for causality
This file defines some helpers for handling causal concepts in notebooks
pyagrum.causal.notebook.getCausalImpact(model, on, doing, knowing=None, values=None)
Section titled “pyagrum.causal.notebook.getCausalImpact(model, on, doing, knowing=None, values=None)”return a HTML representing of the three values defining a causal impact : formula, value, explanation
- Parameters:
- model (CausalModel) – the causal model
- on (str | Set [**str ]) – the impacted variable(s)
- doing (str | Set [**str ]) – the interventions
- knowing (str | Set [**str ]) – the observations
- values (Dict [**str ,**int ] default=None) – value for certain variables
- Return type: HTML
pyagrum.causal.notebook.getCausalModel(cm, size=None)
Section titled “pyagrum.causal.notebook.getCausalModel(cm, size=None)”return a HTML representing the causal model
- Parameters:
- cm (CausalModel) – the causal model
- size (int |**str) – the size of the rendered graph
- Returns: the dot representation
- Return type: pydot.Dot
pyagrum.causal.notebook.showCausalImpact(model, on, doing, knowing=None, values=None)
Section titled “pyagrum.causal.notebook.showCausalImpact(model, on, doing, knowing=None, values=None)”display a HTML representing of the three values defining a causal impact : formula, value, explanation
- Parameters:
- model (CausalModel) – the causal model
- on (str | Set [**str ]) – the impacted variable(s)
- doing (str | Set [**str ]) – the interventions
- knowing (str | Set [**str ]) – the observations
- values (Dict [**str ,**int ] default=None) – value for certain variables
pyagrum.causal.notebook.showCausalModel(cm, size=None)
Section titled “pyagrum.causal.notebook.showCausalModel(cm, size=None)”Shows a pydot svg representation of the causal DAG
- Parameters:
- cm (CausalModel) – the causal model
- size (int |**str) – the size of the rendered graph