Pert20 - Knowledge in Learning
Pert20 - Knowledge in Learning
Non-official Slides
Knowledge in Learning
Session 20
2
Outline
1. A Logical Formulation of Learning
2. Knowledge in Learning
6. Summary
3
A Logical Formulation of Learning
• In this session, the hypotheses are represented by a set of
logical sentences
• Example
4
A Logical Formulation of Learning
• Study case
5
A Logical Formulation of Learning
• Thus, a decision tree can be
interpreted in logical
representation
6
A Logical Formulation of Learning
• As the example arrive, hypotheses that are not consistent with
the examples can be ruled out
7
A Logical Formulation of Learning
8
A Logical Formulation of Learning
• How to find the logically consistent hypothesis?
– Current-best-hypothesis search
– Least-commitment search
9
Current-best-hypothesis Search
• Suppose we have some hypothesis hr
10
Current-best-hypothesis Search
(extensions of predictor Hr)
– HUGE!
12
Least-commitment search
• The problem is similar to how we represent all numbers between
1 and 2
– Using boundary!!
13
Version Space
14
Version Space Learning
• Algorithm:
16
Candidate Elimination Algorithm
• Given : A representation language and a set of positive
and negative examples expressed in that language.
17
Candidate Elimination Algorithm
3. Accept a new training example.
• If it is a positive example
18
Candidate Elimination Algorithm
• If it is a negative example
– Remove from S any descriptions that cover the example
– Update the G set to contain the most general set of
descriptions in the version space that do not cover the
example
• If S and G are both singleton sets, then if they are identical,
output their value and halt.
• If they are both singleton sets but they are different, then the
training cases were inconsistent. Output this result and halt.
• Otherwise, go to step 3.
19
Candidate Elimination
Algorithm
G : { obj(X,Y,Z) }, S: { } Pos : obj(small,red,ball)
20
Candidate Elimination
Algorithm
G : { obj(X,Y,Z) }, S: { } Pos : obj(small,red,ball)
Initialize G to be the most general concept in the space, and
Initialize S to the first pos. training instance
G : { obj(X,Y,Z) }, S :{ obj(small, red, ball) } Neg : obj(small,blue,ball)
21
Candidate Elimination
Algorithm
G : { obj(X,Y,Z) }, S: { } Pos : obj(small,red,ball)
Initialize G to be the most general concept in the space, and
Initialize S to the first pos. training instance
G : { obj(X,Y,Z) }, S :{ obj(small, red, ball) } Neg : obj(small,blue,ball)
22
Candidate Elimination
Algorithm
G : { obj(X,Y,Z) }, S: { } Pos : obj(small,red,ball)
Initialize G to be the most general concept in the space, and
Initialize S to the first pos. training instance
G : { obj(X,Y,Z) }, S :{ obj(small, red, ball) } Neg : obj(small,blue,ball)
24
Candidate Elimination
Algorithm
A Version Space Example
• G = {(x1,x2,x3,x4,x5)}
S = {(Japan, Honda, Blue, 1980, Economy)}
• G = {(Japan,x2,x3,x4,Economy)}
• S = {(Japan,x2,x3,x4,Economy)} 25
Knowledge in Learning
• Let Descriptions denote the conjunction of all the example
descriptions in the training set, and let Classifications denote
the conjunction of all the example classification.
26
Knowledge in Learning
27
Knowledge in Learning
• There are three kinds of learning using prior knowledge:
28
Explanation Based Learning
• A method for extracting general rules from individual
observations
– X2 = 2X
29
Explanation Based Learning
• The technique of memoization has long been used in
computer science to speed up programs by saving the results
of computation.
32
Inductive Logic Programming
• A method for extracting general rules from the background
knowledge and new hypothesis to explain the examples
33
Inductive Logic Programming
• It has gained popularity for three reasons :
1. ILP offers a rigorous approach to the general knowledge-
based inductive learning problem.
– parent_of(charles,george)
– parent_of(george,diana)
– parent_of(bob,harry)
– parent_of(harry,elizabeth)
• grandparent_of(X,Y)? • grandparent_of(charles,diana)
• grandparent_of(bob,elizabeth)
35
Summary
• The use of prior knowledge in learning leads to a picture of
cumulative learning
36
References
• Stuart Russell, Peter Norvig. 2010. Artificial Intelligence : A
Modern Approach. Pearson Education. New Jersey.
ISBN:9780132071482
• http://aima.cs.berkeley.edu
37
Version Space
Case Study
38
Candidate Elimination
Algorithm
Exercises : How About The Concept of Elephant ?
39