Skip to content
Rainbow docs menu

Reference · The Applied Higher-Order Functions catalogue

rainbow.algorithms.proofs.ahof.pc

The Applied Higher-Order Functions cataloguesrc/rainbow/algorithms/proofs/ahof/pc.clj1 definitions, 3 theorems

AHoF D16 PC Algorithm: constraint-based Bayesian-network structure learning. Starting from the complete graph, PC removes an edge X-Y whenever a conditional independence test finds X and Y independent given some conditioning set. The independence test compares a dependence statistic against a significance threshold: independent? statistic threshold = decide (statistic <= threshold) over the exact-rational statistic (a chi-square / partial-correlation value). Proved native and axiom-free, as worked instances: statistic 2 against threshold 5 declares independence; the worked certificate 2 <= 5 (native nnrat/at-most); and statistic 8 against threshold 5 keeps the edge. The soundness of PC's edge removal is classical and not proved here. The statistic computation, the conditioning-set search, and the edge-orientation phase are executable concerns. Requires nnrat/at-most, audit/decide-nnrat-at-most, nnrat/decide-at-most-true-sound (all in the D63 checkpoint). Scope (measured by the kernel): this module has 3 worked instances (statements about specific values). None of its theorems is a guarantee about the algorithm for all inputs; `lein verify rainbow.algorithms.proofs.ahof.pc` prints this classification.

pc/independent?

DefinitionSource, line 53

pc/independent? :
  (x₁ x₂ : ℚ≥0)
  → data/Bool

ℚ≥0 = nnrat/NonnegativeRational

pc/declares-independence

TheoremWorked exampleNo axiomsSource, line 70

pc/declares-independence :
  → lis/extends? 2 5 = data/true

= = equality/Eq

pc/independence-is-sound

TheoremWorked exampleNo axiomsSource, line 78

pc/independence-is-sound :
  → 2 ≤ 5

≤ = nnrat/at-most

pc/keeps-dependent-edge

TheoremWorked exampleNo axiomsSource, line 84

pc/keeps-dependent-edge :
  → lis/extends? 8 5 = data/false

= = equality/Eq