70 likes | 155 Views
Ch. 19 – Knowledge in Learning. Supplemental slides for CSE 327 Prof. Jeff Heflin. Current Best Hypothesis Search.
E N D
Ch. 19 – Knowledge in Learning Supplemental slides for CSE 327 Prof. Jeff Heflin
Current Best Hypothesis Search function CURRENT-BEST-LEARNING(examples) returns a hypothesisH any hypothesis consistent with the first example in examplesfor each remaining example in examplesdo ife is false positive for HthenH choose a specialization of H consistent with examples else ife is false negative for HthenH choose a generalization of H consistent with examplesif no consistent specialization/generalization can be found then failreturnH Note: here chooseis a special operator that allows you to backtrack to a previous choice and select another option when the search fails. An actual implementation would probably use depth-first search instead. From Figure 19.2, p. 681
Example Learning Problem Training Set Only consider candidate definitions that are positive conjunctive sentences
Version Space Learning function VERSION-SPACE-LEARNING(examples)returns a version spacelocal variables:V, the version space (the set of all hypotheses) V the set of all hypothesesfor each example e in examplesdo ifV is not empty thenV VERSION-SPACE-UPDATE(V,e)returnV function VERSION-SPACE-UPDATE(V,e)returns an updated version space V {h V: h is consistent with e}returnV From Figure 19.3, p. 683
Version Space Update Details function VERSION-SPACE-UPDATE(G,S,e)returns an updated G-set and S-set (version space) for eachg in Gife is a false positive for g G G – gG G {h: h is the most general specialization of g that is consistent with e and h is more general than some member of S}ife is a false negative for g G G – gfor eachs in Sife is a false positive for s S S – sife is a false negative for s S S – sS S {h: h is the most specific generalization of s that is consistent with e and h is more specific than some member of G} returnG,S
Example Learning Problem Training Set Only consider candidate definitions that are positive conjunctive sentences