Very special hypothesis algorithm:
sample:
Algorithm Description
1. Initialize h as a special hypothesis in H
2. For each positive example x
to each attribute ai of h
If x satisfies ai, then do nothing
else replace ai in h with the next update that x satisfies. General Hypothesis
3. Output Hypothesis h
The algorithm applies
the most specific assumptions: h = <Æ, Æ, Æ, Æ, Æ, Æ, Æ>
through the 1st sample: h = <Sunny, Warm, Normal, Strong, Warm, Same>
through the 2nd sample : h = <Sunny, Warm, ?, Strong, Warm, Same>
After the 3rd sample: No processing, Find-S ignores every counterexample.
After the 4th sample: h = <Sunny, Warm, ?, Strong, ?, ?>
Analyzing the Find-S algorithm
yields only one hypothesis in the hypothesis space, and it is a very special one. Can't do anything about noisy data. Both attribute values and output values are required to be discrete.
Candidate Elimination Algorithm
Algorithm Description
1. Variation space VersionSpace<- a list containing all hypotheses in H
2. For each training example <x, c<x>>
remove all hypotheses h of h(x)!=c(x) from the variant space
3. Output the list of assumptions in VersionSpace
Candidate Elimination Algorithms Using Variation Spaces
Initialize the set G to the maximal general hypothesis in H
Initialize the set S to the maximal special hypothesis in H
For each training example d, do the following:
· If d is a positive example
Remove all hypotheses from G that are inconsistent with d
· For each hypothesis s in S that is inconsistent with d
Remove s from S
Add to S all minimal generalizations h of s, where h satisfies: h is consistent with d, and some member of G is more general than h
Remove all such assumptions from S: it is more general than another assumption in S
If d is a counterexample
Remove all assumptions from S that are inconsistent with d
For each hypothesis g in G that is inconsistent with d
·Remove g from G
Add to G all minimal specializations h of g, where h satisfies: h is consistent with d, and some member of S is more special than h
Remove all such assumptions from G: it is more specific than another assumption in G
Algorithm example:
http://blog.csdn.net/yang_zhe_/article/details/50570914
Decision Tree Notation
http://blog.csdn.net/HerosOfEarth/article/details/52347820