3. FIND-S
FIND-S :: Find Maximally Specific Hypothesis
1. Initialize h to the most specific hypothesis in H
2. For each positive training instance x
• For each attribute constraint ai in h
• If the constraint ai in h 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
Amir Shokri
4. FIND-S
Amir Shokri
Example Color Toughness Fungus Appearance Poisonous
1 Green Soft No Wrinkled Yes
2 Green Soft Yes Smooth No
3 Brown Hard No Smooth Yes
4 Green Soft Yes Smooth No
5 Orange Soft Yes Wrinkled Yes
h0 = < ∅ , ∅ , ∅ , ∅ >
h1 = < green, soft, no, wrinkled >
5. FIND-S
Amir Shokri
Example Color Toughness Fungus Appearance Poisonous
1 Green Soft No Wrinkled Yes
2 Green Soft Yes Smooth No
3 Brown Hard No Smooth Yes
4 Green Soft Yes Smooth No
5 Orange Soft Yes Wrinkled Yes
h2 = < green, soft, no, wrinkled >
h3 = < ?, ?, no, ? >
6. FIND-S
Amir Shokri
Example Color Toughness Fungus Appearance Poisonous
1 Green Soft No Wrinkled Yes
2 Green Soft Yes Smooth No
3 Brown Hard No Smooth Yes
4 Green Soft Yes Smooth No
5 Orange Soft Yes Wrinkled Yes
h4 = < ?, ?, no, ? >
h5 = < ?, ?, ?, ? >
7. Candidate Elimination
he key idea in the CANDIDATE-ELIMINAION algorithm, is to output a description of the set of
all hypotheses consistent with the training examples.
Amir Shokri
8. Candidate Elimination
Amir Shokri
Example Color Toughness Fungus Appearance Poisonous
1 Green Soft No Wrinkled Yes
2 Green Soft Yes Smooth No
3 Brown Hard No Smooth Yes
4 Green Soft Yes Smooth No
5 Orange Soft Yes Wrinkled Yes
S0 = < ∅ , ∅ , ∅ , ∅ >
G0 = < ?, ?, ?, ? >
9. Candidate Elimination
Amir Shokri
Example Color Toughness Fungus Appearance Poisonous
1 Green Soft No Wrinkled Yes
2 Green Soft Yes Smooth No
3 Brown Hard No Smooth Yes
4 Green Soft Yes Smooth No
5 Orange Soft Yes Wrinkled Yes
S1 = < green, soft, no, wrinkled >
G1 = < ?, ?, ?, ? >
10. Candidate Elimination
Amir Shokri
Example Color Toughness Fungus Appearance Poisonous
1 Green Soft No Wrinkled Yes
2 Green Soft Yes Smooth No
3 Brown Hard No Smooth Yes
4 Green Soft Yes Smooth No
5 Orange Soft Yes Wrinkled Yes
S2 = < green, soft, no, wrinkled >
G2 = < ?, ?, no, ? > < ?, ?, ?, wrinkled>
11. Candidate Elimination
Amir Shokri
Example Color Toughness Fungus Appearance Poisonous
1 Green Soft No Wrinkled Yes
2 Green Soft Yes Smooth No
3 Brown Hard No Smooth Yes
4 Green Soft Yes Smooth No
5 Orange Soft Yes Wrinkled Yes
S3 = < ?, ?, no, ? >
G3 = < ?, ?, no, ? >
12. Candidate Elimination
Amir Shokri
Example Color Toughness Fungus Appearance Poisonous
1 Green Soft No Wrinkled Yes
2 Green Soft Yes Smooth No
3 Brown Hard No Smooth Yes
4 Green Soft Yes Smooth No
5 Orange Soft Yes Wrinkled Yes
S4 = < ?, ?, no, ? >
G4 = < ?, ?, ?, ? >
13. Candidate Elimination
Amir Shokri
Example Color Toughness Fungus Appearance Poisonous
1 Green Soft No Wrinkled Yes
2 Green Soft Yes Smooth No
3 Brown Hard No Smooth Yes
4 Green Soft Yes Smooth No
5 Orange Soft Yes Wrinkled Yes
S5 = < ?, ?, ?, ? >
G5 = < ?, ?, ?, ? >
14. Candidate Elimination
Amir Shokri
Example Color Toughness Fungus Appearance Poisonous
1 Green Soft No Wrinkled Yes
2 Green Soft Yes Smooth No
3 Brown Hard No Smooth Yes
4 Green Soft Yes Smooth No
5 Orange Soft Yes Wrinkled Yes
h =< ?, ?, ?, ? >
15. Candidate Elimination
Amir Shokri
Example Size Color Shape Class/Label
1 big red circle No
2 small red triangle No
3 small red circle Yes
4 big blue circle No
5 small blue circle Yes
S0 = < ∅ , ∅ , ∅ , ∅ >
G0 = < ?, ?, ?, ? >
16. Candidate Elimination
Amir Shokri
Example Size Color Shape Class/Label
1 big red circle No
2 small red triangle No
3 small red circle Yes
4 big blue circle No
5 small blue circle Yes
S1 = < ∅ , ∅ , ∅ >
G1 = < small, ?, ?> < ?, blue, ? > < ?, ?, triangle >
17. Candidate Elimination
Amir Shokri
Example Size Color Shape Class/Label
1 big red circle No
2 small red triangle No
3 small red circle Yes
4 big blue circle No
5 small blue circle Yes
S2 = < ∅ , ∅ , ∅ >
G2 = <small, blue, ?> <small, ?, circle> <?, blue, ?>,
<big, ?, triangle><?, blue, triangle>
18. Candidate Elimination
Amir Shokri
Example Size Color Shape Class/Label
1 big red circle No
2 small red triangle No
3 small red circle Yes
4 big blue circle No
5 small blue circle Yes
S3 = < small, red, circle >
G3 = <small, ?, circle>
19. Candidate Elimination
Amir Shokri
Example Size Color Shape Class/Label
1 big red circle No
2 small red triangle No
3 small red circle Yes
4 big blue circle No
5 small blue circle Yes
S4 = < small, red, circle >
G4 = <small, ?, circle>
20. Candidate Elimination
Amir Shokri
Example Size Color Shape Class/Label
1 big red circle No
2 small red triangle No
3 small red circle Yes
4 big blue circle No
5 small blue circle Yes
S5 = <small, ?, circle>
G5 = <small, ?, circle>