pub fn analyze_differential(
observed: &[String],
kb: &DiagnosticKnowledgeBase,
) -> Result<DifferentialProposal, MedicalError>Expand description
Compute the normalized posterior differential over kb given the present
observed findings.
observed is the list of finding ids observed to be present; the posterior
is proportional to prior · Π P(finding | condition) over those findings.
Fails closed (MedicalError) on an empty KB, a non-finite/non-positive prior,
a likelihood outside [0,1], or when every condition’s unnormalized posterior is
zero (findings incompatible with the whole KB) — never returns a fabricated result.