compute_str_ham_distance: Compute structural Hamming distance

View source: R/graph_theory_functions.R

compute_str_ham_distanceR Documentation

Compute structural Hamming distance

Description

Compute the structural Hamming distance between the true CPDAG cpdag and the estimated CPDAG est_cpdag. The structural Hamming distance is defined as in the paper from Tsamardinos I., Brown L.E., and Aliferis C.F., https://link.springer.com/article/10.1007/s10994-006-6889-7.

Usage

compute_str_ham_distance(cpdag, est_cpdag)

Arguments

cpdag

Square binary matrix. A matrix representing a CPDAG.

est_cpdag

Square binary matrix. The estimated CPDAG.

Value

Numeric — between 0 and 1. The structural Hamming distance between a true CPDAG cpdag and the estimated CPDAG est_cpdag.


nicolagnecco/causalXtreme documentation built on April 21, 2024, 4:22 a.m.