FIND-S Algorithm
2. For each positive training instance x
For each attribute constraint ai in h
If the constraint ai is
satisfied by x
Then do nothing
Else replace ai in h by the next more general constraint that is satisfied by x
3. Output hypothesis h
To illustrate
this algorithm, assume the learner is given the sequence of training examples from the EnjoySport task
Example |
Sky |
AirTemp |
Humidity |
Wind |
Water |
Forecast |
EnjoySport |
1 |
Sunny |
Warm |
Normal |
Strong |
Warm |
Same |
Yes |
2 |
Sunny |
Warm |
High |
Strong |
Warm |
Same |
Yes |
3 |
Rainy |
Cold |
High |
Strong |
Warm |
Change |
No |
4 |
Sunny |
Warm |
High |
Strong |
Cool |
Change |
Yes |
- The first step of FIND-S is to initialize h to the most specific hypothesis in H
h
- (Ø, Ø, Ø, Ø, Ø, Ø)
- Consider the first training example
Observing the
first training example, it is clear that hypothesis h is too specific. None of the "Ø" constraints in h are
satisfied by this example, so each is replaced by the next more general constraint that fits the example
h1 = <Sunny Warm
Normal Strong Warm Same>
- Consider the second training example
x2 = <Sunny, Warm, High, Strong, Warm, Same>, +
h2 = <Sunny Warm ? Strong Warm Same>
- Consider the third training example
x3 = <Rainy, Cold, High,
Strong, Warm, Change>, -
h3 = < Sunny Warm ?
Strong Warm Same>
- Consider the fourth training example
x4 = <Sunny Warm High Strong Cool Change>, +
h4 = < Sunny Warm ? Strong ? ? >
The key property of the FIND-S algorithm
- FIND-S is guaranteed to output the most specific
hypothesis within H that is consistent
with the positive training examples
- FIND-S algorithm’s final
hypothesis will also be consistent with the negative
examples provided the correct
target concept is contained in H, and provided the training examples are correct.
Unanswered by FIND-S
- Has the learner converged to the correct target concept?
- Why prefer the most specific hypothesis?
- Are the training examples consistent?
- What if there are several
maximally specific consistent hypotheses?
0 Comments