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)

return a HTML representing of the three values defining a causal impact : formula, value, explanation :type model: CausalModel :param model: the causal model :type on: Union[str, Set[str]] :param on: the impacted variable(s) :type doing: Union[str, Set[str]] :param doing: the variable(s) of intervention :type knowing: Optional[Set[str]] :param knowing: the variable(s) of evidence :param values : values for certain variables

Return type

Tuple[str, Potential, str]

Returns

a triplet (CausalFormula representation (string), pyAgrum.Potential, explanation)

Parameters

values (Optional[Dict[str, int]]) –

pyAgrum.causal.notebook.getCausalModel(cm, size=None)

return a HTML representing the causal model :type cm: CausalModel :param cm: the causal model :param size: passd :param vals: :rtype: str :return:

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 :type model: CausalModel :param model: the causal model :type on: Union[str, Set[str]] :param on: the impacted variable(s) :type doing: Union[str, Set[str]] :param doing: the variable(s) of intervention :type knowing: Optional[Set[str]] :param knowing: the variable(s) of evidence :param values : values for certain variables

Parameters

values (Optional[Dict[str, int]]) –

pyAgrum.causal.notebook.showCausalModel(cm, size='4')

Shows a graphviz svg representation of the causal DAG d

Parameters