07 Bayesian
Probability And Naïve Bayes¶
Kindly go through Bayes' Theorem in Probability and Statistics
Bayesian Network¶
Represents the dependence between variables
- Nodes - represents variables
- Links - X points to Y, implies X has direct influence over Y or X is a parent of Y
- CPT - each node has a conditional probability distribution which determines the effect of the parent on that node
Joint Probability Distribution¶
\(P(X_i|X_{i-1},........., X_1) = P(X_i |Parents(X_i ))\)
Independence in BN¶
\(X {\perp \!\!\! \perp} Y | Z\) is read as \(X\) is conditionally independent of \(Y\) given \(Z\)
- Casual chains
graph LR;
A((A))-->B((B));
B((B))-->C((C));
In such a configuration, A is guaranteed to be independent of C given B - Common Cause
graph TD;
B((B))-->A((A));
B((B))-->C((C));
In such a configuration, A is guaranteed to be independent of C given B
- Common effect
graph TD;
A((A))-->C((C));
B((B))-->C((C));
In such a configuration, A is guaranteed to be independent of B.
But A and B are not independent given C.
Active Triples¶
graph LR;
A((" "))-->B((" "));
B((" "))-->C((" "));
graph TD;
B((" "))-->A((" "));
B((" "))-->C((" "));
graph TD;
A((" "))-->C((" "));
B((" "))-->C((" "));
style C fill : #808080
graph TD;
A((" "))-->C((" "));
B((" "))-->C((" "));
C((" "))-.->D((" "))
style D fill : #808080
Inactive Triples¶
graph LR;
A((" "))-->B((" "));
B((" "))-->C((" "));
style B fill : #808080
graph TD;
B((" "))-->A((" "));
B((" "))-->C((" "));
style B fill : #808080
graph TD;
A((" "))-->C((" "));
B((" "))-->C((" "));
NOTE : All possible configurations for active and inactive triples are listed above
Notes on d-seperation and variable elimination need to be added