660 likes | 829 Views
Generative Models. Announcements. Probability Review (Friday, 1:15 Gates B03). Late days…. To be fair…. double late days. Start the p-set early. Where we are. Search. Machine Learning. CS221. Variable Based. Search. Machine Learning. CS221. Variable Based. Search. Machine Learning.
E N D
Announcements • Probability Review (Friday, 1:15 Gates B03) • Late days… • To be fair… double late days. • Start the p-set early
Search Machine Learning CS221 Variable Based
Search Machine Learning CS221 Variable Based
Search Machine Learning CS221 Variable Based
Key Idea If we have a joint distribution over all variables, then given evidence (which could be multiple variables) E = e, we can find the probability of any query variable X = x.
Key Idea If we have a joint distribution over all variables, then given evidence (which could be multiple variables) E = e, we can find the probability of any query variable X = x. Y is all variables that aren’t in X or E These are values in our table! Y is all variables that aren’t in E
Key Idea If we have a joint distribution over all variables, then given evidence (which could be multiple variables) E = e, we can find the probability of any query variable X = x. Since we know that p(x | e)’s must sum to 1
Where We Left Off Add variable Snowden location: { Hong Kong, Sao Paulo, Moscow, Nairobi, Caracas, Guantanamo } Size of the table is now 2*2*2*6 = 48 Joint is exponential in size. But what does Snowden have to do with drugged out rockstars? Really are independent…
Independence l = loopy p = purple d = drugged s = snowden If we have two tables, one over l, p, d and one for s, we could recreate the joint.
What else is independent? Snowden Drugged Purple Loopy
What else is independent? Snowden Drugged Purple Loopy Purple and loopy?
What else is independent? Snowden Drugged Purple Loopy Both caused by drugged
What else is independent? Snowden Drugged Purple Loopy If you know drugged, purple and loopy are independent!
Conditional Independence If you know drugged, purple and loopy are independent!
Conditional Independence Joint If you know drugged, purple and loopy are independent!
Conditional Independence Joint If you know drugged, purple and loopy are independent!
Conditional Independence Joint If you know drugged, purple and loopy are independent!
Conditional Independence Drugged Purple Loopy No longer need the full joint.
Bayesian Network Stomach Bug Flu Vomit Cough Fever
Bayesian Network Stomach Bug Flu Vomit Cough Fever
Bayesian Network Stomach bug (s) Flu (f) Vomit (v) Cough (c) Fever (t)
Bayesian Network Stomach bug (s) Flu (f) Vomit (v) Cough (c) Fever (t) Joint
Bayesian Network Joint
Bayesian Network Stomach bug (s) Flu (f) Vomit (v) Fever (t) Cough (c) Joint
Formally Definition: Bayes Net = DAG DAG: directed acyclic graph (BN’s structure) • Nodes: random variables (typically discrete, but methods also exist to handle continuous variables) • Arcs: indicate probabilistic dependencies between nodes. Go from cause to effect. • CPDs: conditional probability distribution (BN’s parameters) Conditional probabilities at each node, usually stored as a table (conditional probability table, or CPT) Root nodes are a special case – no parents, so just use priors in CPD:
The AI Pipeline Real World Problem Model the problem Formal Problem Apply an Algorithm Evaluate Solution