Ex4pmEngine.Cognition.BayesianNetwork (ex4pm v26.9.9)

Copy Markdown View Source

Discrete Bayesian Network inference engine supporting exact marginalization, conditional belief updates, and variable elimination over directed acyclic graphs.

Summary

Functions

Performs exact inference to compute the posterior distribution P(Query | Evidence). evidence is a map of {node_name => observed_value}.

Constructs a new Bayesian Network with nodes and conditional probability tables.

Types

t()

@type t() :: %Ex4pmEngine.Cognition.BayesianNetwork{
  cpts: %{optional(String.t()) => map()},
  metadata: map(),
  nodes: [String.t()]
}

Functions

infer(bn, query_var, evidence \\ %{})

Performs exact inference to compute the posterior distribution P(Query | Evidence). evidence is a map of {node_name => observed_value}.

new(nodes, cpts, metadata \\ %{})

Constructs a new Bayesian Network with nodes and conditional probability tables.