Top Banner
Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell
25

Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

Dec 18, 2015

Download

Documents

Paul Hampton
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

Machine Learning

Chapter 10. Learning Sets of Rules

Tom M. Mitchell

Page 2: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

2

Learning Disjunctive Sets of Rules

Method 1: Learn decision tree, convert to rules

Method 2: Sequential covering algorithm: 1. Learn one rule with high accuracy, any

coverage 2. Remove positive examples covered by this

rule 3. Repeat

Page 3: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

3

Sequential Covering AlgorithmSEQUENTIAL-COVERING (Target attribute; Attributes; Examples; Threshold) Learned rules {} Rule LEARN-ONE-

RULE(Target_attribute, Attributes, Examples) while PERFORMANCE (Rule, Examples) > Threshold, do

– Learned_rules Learned_rules + Rule

– Examples Examples – {examples correctly classified by Rule}– Rule LEARN-ONE-

RULE (Target_attribute, Attributes, Examples)– Learned_rules sort Learned_rules accord to

PERFORMANCE over Examples

– return Learned_rules

Page 4: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

4

Learn-One-Rule

Page 5: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

5

Learn-One-Rule(Cont.) Pos positive Examples Neg negative Examples while Pos, do

Learn a NewRule- NewRule most general rule possible- NewRule Neg - while NewRuleNeg, do

Add a new literal to specialize NewRule1. Candidate literals generate candidates

2. Best_literal argmaxLCandidate literals

Performance(SpecializeRule(NewRule; L))3. add Best_literal to NewRule preconditions4. NewRuleNeg subset of NewRuleNegthat satisfies NewRule preconditions

- Learned_rules Learned_rules + NewRule- Pos Pos – {members of Pos coverd by NewRule}

Return Learned_rules

Page 6: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

6

Subtleties: Learn One Rule

1. May use beam search

2. Easily generalizes to multi-valued target functions

3. Choose evaluation function to guide search:– Entropy (i.e., information gain)

– Sample accuracy:

where nc = correct rule predictions, n = all predictions

m estimate:

Page 7: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

7

Variants of Rule Learning Programs

Sequential or simultaneous covering of data?

General specific, or specific general? Generate-and-test, or example-driven? Whether and how to post-prune? What statistical evaluation function?

Page 8: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

8

Learning First Order Rules

Why do that? Can learn sets of rules such as

Ancestor(x, y) Parent(x; y)Ancestor(x; y) Parent(x; z) ^ Ancestor(z; y)

General purpose programming languagePROLOG : programs are sets of such rules

Page 9: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

9

First Order Rule for Classifying Web Pages

[Slattery, 1997]

course(A) has-word(A, instructor),

Not has-word(A, good),

link-from(A, B),

has-word(B, assign),

Not link-from(B, C)

Train: 31/31, Test: 31/34

Page 10: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

10

Page 11: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

11

Specializing Rules in FOIL

Page 12: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

12

Information Gain in FOIL

Page 13: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

13

Induction as Inverted Deduction

Page 14: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

14

Induction as Inverted Deduction(Cont’)

Page 15: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

15

Induction is, in fact, the inverse operation of deduction, and cannot be conceived to exist without the corresponding operation, so that the question of relative importance cannot arise. Who thinks of asking whether addition or subtraction is the more important process in arithmetic? But at the same time much difference in difficulty may exist between a direct and inverse operation; : : : it must be allowed that inductive investigations are of a far higher degree of difficulty and complexity than any questions of deduction….

(Jevons 1874)

Induction as Inverted Deduction(Cont’)

Page 16: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

16

Induction as Inverted Deduction(Cont’)

Page 17: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

17

Induction as Inverted Deduction(Cont’)

Page 18: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

18

Induction as Inverted Deduction(Cont’)

Page 19: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

19

Deduction: Resolution Rule

Page 20: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

20

Inverting Resolution

Page 21: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

21

Inverted Resolution (Propositional)

Page 22: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

22

First order resolution

Page 23: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

23

Inverting First order resolution

Page 24: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

24

Cigol

Page 25: Machine Learning Chapter 10. Learning Sets of Rules Tom M. Mitchell.

25

Progol