Learn R Programming

caugi (version 1.0.0)

aid: Adjustment Identification Distance

Description

Compute the Adjustment Identification Distance (AID) between two graphs using the gadjid Rust package.

Usage

aid(truth, guess, type = c("oset", "ancestor", "parent"), normalized = TRUE)

Value

A numeric representing the AID between the two graphs, if normalized = TRUE, or an integer count if normalized = FALSE.

Arguments

truth

A caugi object.

guess

A caugi object.

type

A character string specifying the type of AID to compute. Options are "oset" (default), "ancestor", and "parent".

normalized

Logical; if TRUE, returns the normalized AID. If FALSE, returns the count.

See Also

Other metrics: hd(), shd()

Examples

Run this code
set.seed(1)
truth <- generate_graph(n = 100, m = 200, class = "DAG")
guess <- generate_graph(n = 100, m = 200, class = "DAG")
aid(truth, guess) # 0.0187

Run the code above in your browser using DataLab