Bayesian Networks (also called "belief networks") are a type of probabilistic graphical model that use a graph structure to represent conditional dependencies between variables. They provide a compact way to represent and reason about complex probability distributions.
A Bayesian network consists of:
Bayesian networks assume that each attribute is conditionally independent of its non-descendants given its parent nodes. This allows the joint probability distribution to be factorized:
where is the set of parent nodes of
For a Bayesian network with variables (好瓜 , 甜度 , 敲声 , 色泽 , 根蒂 ):
Structure: ,
Conditional Independence:
Given parent , children and are independent.
Structure: ,
Marginal Independence:
Key: Given , and become dependent (explaining away effect).
Structure:
Conditional Independence:
Given intermediate node , and are independent.
To analyze D-separation, we first convert the directed graph to an undirected moral graph:
Two variables and are D-separated by set if and are separated into different connected components in the moral graph after removing nodes in .
If and are D-separated by , then (conditional independence).
Structure learning aims to find the optimal network structure that best fits the training data. Common scoring functions include:
where
where ( is sample size)
Based on information-theoretic principles, balancing model complexity and data fit.
Finding the optimal Bayesian network structure is NP-hard. In practice, we use heuristic search algorithms (e.g., greedy search, genetic algorithms) to find good structures rather than optimal ones.
Directly compute posterior probabilities from the joint distribution defined by the Bayesian network. However, exact inference is NP-hard for general networks.
For complex networks, we use approximate methods:
Bayesian network for disease diagnosis
Variables: Disease (D), Symptom1 (S1), Symptom2 (S2), Test Result (T), Age (A)
Dependencies:
Joint Probability:
Given observed symptoms S1=present, S2=present, and test result T=positive, we can compute:
This allows us to diagnose the probability of disease given the observed evidence.