Skip to main content

identify_effect

Function identify_effect 

Source
pub fn identify_effect(
    project: &Project,
    source: &str,
    target: &str,
) -> CausalEffectVerdict
Expand description

v0.44: Find an adjustment set that satisfies the back-door criterion for the effect of source on target, or report that no such set exists in the observed graph.

Algorithm (conservative search):

  1. Enumerate all paths from source to target up to a length cap.
  2. Filter to back-door paths (those starting with an incoming edge to source).
  3. Build the candidate set: all nodes that are not descendants of source and not source/target themselves.
  4. Try the empty set first. If every back-door path is d-separated by the empty set, return identified-empty.
  5. Try each single candidate. If any candidate blocks all back-door paths and is not a descendant of source, return identified-with-Z.
  6. Try pairs (bounded). If found, return identified.
  7. Otherwise underidentified, with the open back-door paths.

Subset search is bounded at size 2 by default. For larger graphs this is incomplete but the existing graph density on Vela is low enough that empty / singleton / pair coverage is typical.