graph_record#

causalbase.metrics.graph_record(true, dag, score)[source]#

Arcs, score and distances to the true network of a learned DAG.

Returns a JSON-serialisable dict with edges ([parent, child] pairs), n_edges, bdeu (score summed over the families of dag), smhd (moral graphs), shd_dag (arcs added, removed or reversed), shd_cpdag (between the equivalence classes) and shd_skeleton.