DiscreteBN#

class causalbase.io.DiscreteBN(dag, names, outcomes, parent_order, cpts)[source]#

A discrete Bayesian network loaded from an XMLBIF file.

Attributes:
dagDAG

Directed acyclic graph over the variables, indexed in the same order as names.

nameslist[str]

Variable names, in the order they were declared in the source file. dag node j corresponds to names[j].

outcomeslist[list[str]]

Outcome labels per variable, in declaration order.

parent_orderlist[tuple[int, …]]

Parents per variable, in <GIVEN> order, which is the order that indexes the rows of cpts[j].

cptslist[np.ndarray]

cpts[j] has one row per parent configuration (first parent varying slowest) and one column per outcome of variable j. Rows sum to 1.