cvx_bayes/lib.rs
1//! # `cvx-bayes` — Bayesian Network Inference for ChronosVector
2//!
3//! Provides discrete Bayesian networks for probabilistic reasoning over
4//! temporal episode data. Designed to answer questions that vector
5//! similarity alone cannot:
6//!
7//! - P(success | task_type=clean, region=R5, action=navigate)
8//! - "How confident am I in this prediction?" (posterior variance)
9//! - "What's the most likely action given partial observations?"
10//!
11//! ## Theoretical Foundation
12//!
13//! A Bayesian network is a directed acyclic graph (DAG) where:
14//! - **Nodes** are random variables (task_type, region, action, success)
15//! - **Edges** encode conditional dependencies
16//! - **CPTs** (Conditional Probability Tables) store P(X | parents(X))
17//!
18//! Inference computes the posterior P(query | evidence) by propagating
19//! beliefs through the graph. For small networks (< 20 variables),
20//! exact inference via variable elimination is tractable.
21//!
22//! ## References
23//!
24//! - Pearl, J. (1988). *Probabilistic Reasoning in Intelligent Systems*
25//! - Koller & Friedman (2009). *Probabilistic Graphical Models*
26//! - Murphy, K. (2012). *Machine Learning: A Probabilistic Perspective*
27
28#![deny(unsafe_code)]
29#![warn(missing_docs)]
30
31pub mod cpt;
32pub mod network;
33pub mod variable;
34
35pub use cpt::Cpt;
36pub use network::BayesianNetwork;
37pub use variable::{Variable, VariableId};