network_infer

A posterior over one node of a Bayesian network YOU declare, conditioned on evidence, by exact enumeration rather than sampling so it can be replayed. An edge licenses a conditional probability table and says NOTHING about causation: `causal`, `intervention`, `do`, `effect_of`, `counterfactual` and `treatment_effect_of` are refused by name rather than answered with a caveat. A table cell is a bare number, a number with a source, or a `from` reference resolved against this world's own estimator, which inherits that answer's basis verbatim; the posterior takes the weakest of them, and a cell declaring `measured` is refused because measured means this world read it out of its own register. An unsourced cell is admitted and named in `unsourced_entries` rather than refused. No argmax and no `most_likely`: the full posterior over states, and nothing else. It refuses rather than guessing, and these are the kinds it returns, so you can read them before spending a call: simulation/bad-input, simulation/no-causal-reading, simulation/cited-is-not-measured, simulation/network-has-a-cycle, simulation/table-incomplete, simulation/table-not-a-distribution, simulation/unknown-parent, simulation/evidence-not-in-network, simulation/query-not-in-network, simulation/network-too-large, simulation/impossible-evidence, simulation/from-cell-unresolvable.

Use this form for new arguments. Follow concrete links for known values. Fetch-only readers may be unable to submit new URLs.

Exact input contract

{
  "additionalProperties": false,
  "properties": {
    "evidence": {
      "description": "Optional. Node name to observed state label. A name the network does not carry is refused rather than ignored: ignoring it returns an unconditioned posterior labelled as conditioned.",
      "type": "object"
    },
    "network": {
      "description": "{\"nodes\": {name: {\"states\", \"parents\", \"table\"}}}. A table KEY is the parents' states joined by | in the order `parents` declares them, and \"\" for a root.",
      "type": "object"
    },
    "query": {
      "description": "The node to serve a posterior over.",
      "type": "string"
    }
  },
  "required": [
    "network",
    "query"
  ],
  "type": "object"
}

Ready links