Causality Analyzer
    Preparing search index...
    • Gibbs Sampling — Markov Chain Monte Carlo for approximate inference.

      Sequentially samples each non-evidence variable from its full conditional distribution given its Markov blanket. Uses burn-in + thinning.

      Parameters

      • cpts: Map<string, CPT>

        — CPTs

      • nodeNames: string[]

        — topological order

      • parents: Map<string, string[]>

        — parent mapping

      • query: string

        — query variable

      • evidence: Evidence

        — observed values

      • options: { burnIn?: number; iterations?: number; seed?: number; thin?: number } = {}

        — iterations (default 10000), burnIn (default 1000), thin (default 1), seed

      Returns { acceptanceRate: number; posterior: Map<number, number> }

      posterior distribution with acceptance rate