Evaluate the output of the causal inference method called by
causal_discovery.
causal_metrics(simulated_data, estimated_graphs)List returned by simulate_data.
The list is made of:
dataset --- Numeric matrix. Dataset of simulated data with
n rows and p columns (note that the hidden variables are not
included in this matrix).
dag --- Square binary matrix. The generated DAG, including
both the observed variables and the confounders,
if the argument has_confounder = TRUE when calling
simulate_data.
pos_confounders --- Integer vector. Represents the position
of confounders (rows and columns) in dag.
If the argument has_confounder = FALSE when calling
simulate_data, then pos_confounders = integer(0).
List returned by causal_discovery.
The list is made of:
est_g --- Square binary matrix
(or NA in case of error).
The estimated DAG (or CPDAG when the method is pc or
pc_rank).
est_cpdag --- Square binary matrix
(or NA in case of error).
The estimated CPDAG.
List. The list is made of:
sid Numeric --- between 0 and 1 --- (or NA if
est_g is NA). The structural intervention distance between
the true DAG dag and the estimated DAG (or CPDAG) est_g.
See also compute_str_int_distance.
shd Numeric --- between 0 and 1 --- (or NA if
est_cpdag is NA). The structural Hamming distance
between the true CPDAG (dag_to_cpdag(dag))
and the estimated CPDAG est_cpdag.
See also compute_str_ham_distance.
The evaluation is done with respect to
the structural intervention
distance (see compute_str_int_distance).
and the
structural Hamming distance (see compute_str_ham_distance).