SlideShare a Scribd company logo
1
UNIT I: Concept Learning
• Learning from examples
• General-to-specific ordering over hypotheses
• Version Spaces and candidate elimination
algorithm
• Picking new examples
• The need for inductive bias
2
Features from Computer View
Purple
Green
Green
Yellow
Yellow Yes
Yes Yes
Yes
Yes
Yes
No
No
No
Yes
Round
Round
Round
Square
Round
Square
Round
Square
Square
Round
Eyes Fcolor
Nose Hair?
Head Smile?
Triangle
Square
Triangle
Square
Triangle
3
Representing Hypotheses
Many possible representations for hypotheses h
Idea: h as conjunctions of constraints on features
Each constraint can be:
– a specific value (e.g., Nose = Square)
– don’t care (e.g., Eyes = ?)
– no value allowed (e.g., Water=Ø)
For example,
Eyes Nose Head Fcolor Hair?
<Round, ?, Round, ?, No>
?
4
Prototypical Concept Learning Task
Given:
– Instances X: Faces, each described by the attributes
Eyes, Nose, Head, Fcolor, and Hair?
– Target function c: Smile? : X -> { no, yes }
– Hypotheses H: Conjunctions of literals such as
<?,Square,Square,Yellow,?>
– Training examples D: Positive and negative examples
of the target function
Determine: a hypothesis h in H such that h(x)=c(x)
for all x in D.





 )
(
,
,...,
)
(
,
,
)
(
, 2
2
1
1 m
m x
c
x
x
c
x
x
c
x
5
Inductive Learning Hypothesis
Any hypothesis found to approximate the target
function well over a sufficiently large set of
training examples will also approximate the target
function well over other unobserved examples.
• What are the implications?
• Is this reasonable?
• What (if any) are our alternatives?
• What about concept drift (what if our views/tastes
change over time)?
6
Instances, Hypotheses, and More-General-Than
Instances X Hypotheses H
x1
=<Round,Square,Square,Purple,Yes>
Specific
General
x2
=<Round,Square,Round,Green,Yes>
h1
=<Round,?,Square,?,?>
h3
=<Round,?,?,?,?>
h2
=<Round,?,?,?,Yes>
h3
h1 h2
7
Find-S Algorithm
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 next more general constraint satisfied by x
3. Output hypothesis h
8
Hypothesis Space Search by Find-S
h3,4
Instances X Hypotheses H
Specific
General
h1,2
h1=<Round,Triangle,Round,Purple,Yes>
x1=<Round,Triangle,Round,Purple,Yes> +
x2=<Square,Square,Square,Green,Yes> -
x5=<Square,Square,Round,Yellow,Yes> +
x4=<Round,Triangle,Round,Green,No> -
x3=<Square,Triangle,Round,Yellow,Yes> +
h2=<Round,Triangle,Round,Purple,Yes>
h3=<?,Triangle,Round,?,Yes>
h4=<?,Triangle,Round,?,Yes>
h5=<?,?,Round,?,Yes>
h0=< >
h0
x
1
x
4
x
2
x
5
x
3
h5
9
Complaints about Find-S
• Cannot tell whether it has learned concept
• Cannot tell when training data inconsistent
• Picks a maximally specific h (why?)
• Depending on H, there might be several!
• How do we fix this?
10
The List-Then-Eliminate Algorithm
1. Set VersionSpace equal to a list containing every
hypothesis in H
2. For each training example, <x,c(x)>
remove from VersionSpace any hypothesis h for which
h(x) != c(x)
3. Output the list of hypotheses in VersionSpace
• But is listing all hypotheses reasonable?
• How many different hypotheses in our simple
problem?
– How many not involving “?” terms?
11
Version Spaces
A hypothesis h is consistent with a set of training
examples D of target concept c if and only if
h(x)=c(x) for each training example in D.
The version space, VSH,D, with respect to hypothesis
space H and training examples D, is the subset of
hypotheses from H consistent with all training
examples in D.
)
(
)
(
)
)
(
,
(
)
,
( x
c
x
h
D
x
c
x
D
h
Consistent 





)}
,
(
|
{
, D
h
Consistent
H
h
VS D
H 

12
Example Version Space
S: { <?,Triangle,Round,?,Yes> }
G: { <?,?,Round,?,?> <?,Triangle,?,?,?> }
<?,?,Round,?,Yes> <?,Triangle,?,?,Yes>
<?,Triangle,Round,?,?>
13
Representing Version Spaces
The General boundary, G, of version space VSH,D is
the set of its maximally general members.
The Specific boundary, S, of version space VSH,D is
the set of its maximally specific members.
Every member of the version space lies between
these boundaries
y
x
y
x
s
h
g
G
g
S
s
H
h
VS D
H
to
equal
or
general
more
is
means
where
)}
)(
)(
(
|
{
,









14
Candidate Elimination Algorithm
G = maximally general hypotheses in H
S = maximally specific hypotheses in H
For each training example d, do
If d is a positive example
Remove from G any hypothesis that does not include d
For each hypothesis s in S that does not include d
Remove s from S
Add to S all minimal generalizations h of s such that
1. h includes d, and
2. Some member of G is more general than h
Remove from S any hypothesis that is more general
than another hypothesis in S
15
Candidate Elimination Algorithm (cont)
For each training example d, do (cont)
If d is a negative example
Remove from S any hypothesis that does include d
For each hypothesis g in G that does include d
Remove g from G
Add to G all minimal generalizations h of g such that
1. h does not include d, and
2. Some member of S is more specific than h
Remove from G any hypothesis that is less general
than another hypothesis in G
If G or S ever becomes empty, data not consistent (with H)
16
Example Trace
S0: { <Ø,Ø,Ø,Ø,Ø> }
G0: { <?,?,?,?,?> }
X1=<R,T,R,P,Y> +
S1: { <R,T,R,P,Y> }
G1
X2=<S,S,S,G,Y> -
G2: { <R,?,?,?,?>, <?,T,?,?,?>, <?,?,R,?,?>, <?,?,?,P,?> }
S2
X3=<S,T,R,Y,Y> +
S3: { <?,T,R,?,Y> }
G3
X4=<R,T,R,G,N> -
G4: { <?,T,?,?,Y>, <?,?,R,?,Y> }
S4
X5=<S,S,R,Y,Y> +
S5: { <?,?,R,?,Y> }
G5
17
What Training Example Next?
S: { <?,Triangle,Round,?,Yes> }
G: { <?,?,Round,?,?> <?,Triangle,?,?,?> }
<?,?,Round,?,Yes> <?,Triangle,?,?,Yes>
<?,Triangle,Round,?,?>
18
How Should These Be Classified?
S: { <?,Triangle,Round,?,Yes> }
G: { <?,?,Round,?,?> <?,Triangle,?,?,?> }
<?,?,Round,?,Yes> <?,Triangle,?,?,Yes>
<?,Triangle,Round,?,?>
? ? ?
19
What Justifies this Inductive Leap?
+ < Round, Triangle, Round, Purple, Yes >
+ < Square, Triangle, Round, Yellow, Yes >
S: < ?, Triangle, Round, ?, Yes >
Why believe we can classify the unseen?
< Square, Triangle, Round, Purple, Yes > ?
20
An UN-Biased Learner
Idea: Choose H that expresses every teachable
concept (i.e., H is the power set of X)
Consider H’ = disjunctions, conjunctions, negations
over previous H.
For example:
What are S, G, in this case?




 ?
,
?,
,
,
?,
,
,
?, Purple
Square
Square
Yes
Round
Triangle
21
Inductive Bias
Consider
– concept learning algorithm L
– instances X, target concept c
– training examples Dc={<x,c(x)>}
– let L(xi,Dc) denote the classification assigned to the
instance xi by L after training on data Dc.
Definition:
The inductive bias of L is any minimal set of assertions B
such that for any target concept c and corresponding
training examples Dc
where A B means A logically entails B
)]
,
(
)
)[(
( c
i
i
c
i D
x
L
x
D
B
X
x 



22
Inductive Systems and Equivalent Deductive Systems
Candidate
Elimination
Algorithm
Using Hypothesis
Space H
Theorem Prover
Training examples
Training examples
New instance
New instance
Assertion "H
contains hypothesis"
Classification of
new instance, or
"don't know"
Classification of
new instance, or
"don't know"
Inductive System
Equivalent Deductive System

More Related Content

PPT
concept-learning.ppt
PPT
Lecture: Introduction to concept-learning.ppt
PPT
concept-learning of artificial intelligence
PPTX
Poggi analytics - concepts - 1a
PDF
Concept Learning in Artificial Intelligence
PPTX
Machine Learning CONCEPT LEARNING AS SEARCH.pptx
PPT
Machine Learning Chapter 11 2
PPTX
General-to specific ordering of hypotheses Learning algorithms which use this...
concept-learning.ppt
Lecture: Introduction to concept-learning.ppt
concept-learning of artificial intelligence
Poggi analytics - concepts - 1a
Concept Learning in Artificial Intelligence
Machine Learning CONCEPT LEARNING AS SEARCH.pptx
Machine Learning Chapter 11 2
General-to specific ordering of hypotheses Learning algorithms which use this...

Similar to UNIT 1-INTRODUCTION-MACHINE LEARNING TECHNIQUES-AD (20)

PPT
classification of learning methods...ppt
PPT
ML_Lecture_2 well posed algorithm find s.ppt
PPTX
ML_Unit_1_Part_B
PPT
Supervised_Learning.ppt
PDF
Lecture05_Version Space Algorithm Part1.pdf
PPT
AI_Lecture_34.ppt
PPTX
Lec 17
PPTX
Concept learning and candidate elimination algorithm
PPT
Introduction to machine learning
PPT
ppt
PPT
ppt
PPTX
Version space - Concept Learning - Machine learning
PPTX
artificial intelligence.pptx
PPTX
Lecture04_Concept Learning_ FindS Algorithm.pptx
PDF
AI Lesson 34
PPT
Version spaces
PPT
Version spaces
PDF
conceptlearningrelated to machine learninig .pdf
PPT
knowld in learning jkjdsbfbsdvs iuuohgguh
PDF
week3.pdf
classification of learning methods...ppt
ML_Lecture_2 well posed algorithm find s.ppt
ML_Unit_1_Part_B
Supervised_Learning.ppt
Lecture05_Version Space Algorithm Part1.pdf
AI_Lecture_34.ppt
Lec 17
Concept learning and candidate elimination algorithm
Introduction to machine learning
ppt
ppt
Version space - Concept Learning - Machine learning
artificial intelligence.pptx
Lecture04_Concept Learning_ FindS Algorithm.pptx
AI Lesson 34
Version spaces
Version spaces
conceptlearningrelated to machine learninig .pdf
knowld in learning jkjdsbfbsdvs iuuohgguh
week3.pdf
Ad

Recently uploaded (20)

PDF
PPT on Performance Review to get promotions
PPTX
Welding lecture in detail for understanding
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Geodesy 1.pptx...............................................
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
additive manufacturing of ss316l using mig welding
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
web development for engineering and engineering
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Digital Logic Computer Design lecture notes
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPT on Performance Review to get promotions
Welding lecture in detail for understanding
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Geodesy 1.pptx...............................................
Foundation to blockchain - A guide to Blockchain Tech
Internet of Things (IOT) - A guide to understanding
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
additive manufacturing of ss316l using mig welding
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Operating System & Kernel Study Guide-1 - converted.pdf
web development for engineering and engineering
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Digital Logic Computer Design lecture notes
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
bas. eng. economics group 4 presentation 1.pptx
Ad

UNIT 1-INTRODUCTION-MACHINE LEARNING TECHNIQUES-AD

  • 1. 1 UNIT I: Concept Learning • Learning from examples • General-to-specific ordering over hypotheses • Version Spaces and candidate elimination algorithm • Picking new examples • The need for inductive bias
  • 2. 2 Features from Computer View Purple Green Green Yellow Yellow Yes Yes Yes Yes Yes Yes No No No Yes Round Round Round Square Round Square Round Square Square Round Eyes Fcolor Nose Hair? Head Smile? Triangle Square Triangle Square Triangle
  • 3. 3 Representing Hypotheses Many possible representations for hypotheses h Idea: h as conjunctions of constraints on features Each constraint can be: – a specific value (e.g., Nose = Square) – don’t care (e.g., Eyes = ?) – no value allowed (e.g., Water=Ø) For example, Eyes Nose Head Fcolor Hair? <Round, ?, Round, ?, No> ?
  • 4. 4 Prototypical Concept Learning Task Given: – Instances X: Faces, each described by the attributes Eyes, Nose, Head, Fcolor, and Hair? – Target function c: Smile? : X -> { no, yes } – Hypotheses H: Conjunctions of literals such as <?,Square,Square,Yellow,?> – Training examples D: Positive and negative examples of the target function Determine: a hypothesis h in H such that h(x)=c(x) for all x in D.       ) ( , ,..., ) ( , , ) ( , 2 2 1 1 m m x c x x c x x c x
  • 5. 5 Inductive Learning Hypothesis Any hypothesis found to approximate the target function well over a sufficiently large set of training examples will also approximate the target function well over other unobserved examples. • What are the implications? • Is this reasonable? • What (if any) are our alternatives? • What about concept drift (what if our views/tastes change over time)?
  • 6. 6 Instances, Hypotheses, and More-General-Than Instances X Hypotheses H x1 =<Round,Square,Square,Purple,Yes> Specific General x2 =<Round,Square,Round,Green,Yes> h1 =<Round,?,Square,?,?> h3 =<Round,?,?,?,?> h2 =<Round,?,?,?,Yes> h3 h1 h2
  • 7. 7 Find-S Algorithm 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 next more general constraint satisfied by x 3. Output hypothesis h
  • 8. 8 Hypothesis Space Search by Find-S h3,4 Instances X Hypotheses H Specific General h1,2 h1=<Round,Triangle,Round,Purple,Yes> x1=<Round,Triangle,Round,Purple,Yes> + x2=<Square,Square,Square,Green,Yes> - x5=<Square,Square,Round,Yellow,Yes> + x4=<Round,Triangle,Round,Green,No> - x3=<Square,Triangle,Round,Yellow,Yes> + h2=<Round,Triangle,Round,Purple,Yes> h3=<?,Triangle,Round,?,Yes> h4=<?,Triangle,Round,?,Yes> h5=<?,?,Round,?,Yes> h0=< > h0 x 1 x 4 x 2 x 5 x 3 h5
  • 9. 9 Complaints about Find-S • Cannot tell whether it has learned concept • Cannot tell when training data inconsistent • Picks a maximally specific h (why?) • Depending on H, there might be several! • How do we fix this?
  • 10. 10 The List-Then-Eliminate Algorithm 1. Set VersionSpace equal to a list containing every hypothesis in H 2. For each training example, <x,c(x)> remove from VersionSpace any hypothesis h for which h(x) != c(x) 3. Output the list of hypotheses in VersionSpace • But is listing all hypotheses reasonable? • How many different hypotheses in our simple problem? – How many not involving “?” terms?
  • 11. 11 Version Spaces A hypothesis h is consistent with a set of training examples D of target concept c if and only if h(x)=c(x) for each training example in D. The version space, VSH,D, with respect to hypothesis space H and training examples D, is the subset of hypotheses from H consistent with all training examples in D. ) ( ) ( ) ) ( , ( ) , ( x c x h D x c x D h Consistent       )} , ( | { , D h Consistent H h VS D H  
  • 12. 12 Example Version Space S: { <?,Triangle,Round,?,Yes> } G: { <?,?,Round,?,?> <?,Triangle,?,?,?> } <?,?,Round,?,Yes> <?,Triangle,?,?,Yes> <?,Triangle,Round,?,?>
  • 13. 13 Representing Version Spaces The General boundary, G, of version space VSH,D is the set of its maximally general members. The Specific boundary, S, of version space VSH,D is the set of its maximally specific members. Every member of the version space lies between these boundaries y x y x s h g G g S s H h VS D H to equal or general more is means where )} )( )( ( | { ,         
  • 14. 14 Candidate Elimination Algorithm G = maximally general hypotheses in H S = maximally specific hypotheses in H For each training example d, do If d is a positive example Remove from G any hypothesis that does not include d For each hypothesis s in S that does not include d Remove s from S Add to S all minimal generalizations h of s such that 1. h includes d, and 2. Some member of G is more general than h Remove from S any hypothesis that is more general than another hypothesis in S
  • 15. 15 Candidate Elimination Algorithm (cont) For each training example d, do (cont) If d is a negative example Remove from S any hypothesis that does include d For each hypothesis g in G that does include d Remove g from G Add to G all minimal generalizations h of g such that 1. h does not include d, and 2. Some member of S is more specific than h Remove from G any hypothesis that is less general than another hypothesis in G If G or S ever becomes empty, data not consistent (with H)
  • 16. 16 Example Trace S0: { <Ø,Ø,Ø,Ø,Ø> } G0: { <?,?,?,?,?> } X1=<R,T,R,P,Y> + S1: { <R,T,R,P,Y> } G1 X2=<S,S,S,G,Y> - G2: { <R,?,?,?,?>, <?,T,?,?,?>, <?,?,R,?,?>, <?,?,?,P,?> } S2 X3=<S,T,R,Y,Y> + S3: { <?,T,R,?,Y> } G3 X4=<R,T,R,G,N> - G4: { <?,T,?,?,Y>, <?,?,R,?,Y> } S4 X5=<S,S,R,Y,Y> + S5: { <?,?,R,?,Y> } G5
  • 17. 17 What Training Example Next? S: { <?,Triangle,Round,?,Yes> } G: { <?,?,Round,?,?> <?,Triangle,?,?,?> } <?,?,Round,?,Yes> <?,Triangle,?,?,Yes> <?,Triangle,Round,?,?>
  • 18. 18 How Should These Be Classified? S: { <?,Triangle,Round,?,Yes> } G: { <?,?,Round,?,?> <?,Triangle,?,?,?> } <?,?,Round,?,Yes> <?,Triangle,?,?,Yes> <?,Triangle,Round,?,?> ? ? ?
  • 19. 19 What Justifies this Inductive Leap? + < Round, Triangle, Round, Purple, Yes > + < Square, Triangle, Round, Yellow, Yes > S: < ?, Triangle, Round, ?, Yes > Why believe we can classify the unseen? < Square, Triangle, Round, Purple, Yes > ?
  • 20. 20 An UN-Biased Learner Idea: Choose H that expresses every teachable concept (i.e., H is the power set of X) Consider H’ = disjunctions, conjunctions, negations over previous H. For example: What are S, G, in this case?      ? , ?, , , ?, , , ?, Purple Square Square Yes Round Triangle
  • 21. 21 Inductive Bias Consider – concept learning algorithm L – instances X, target concept c – training examples Dc={<x,c(x)>} – let L(xi,Dc) denote the classification assigned to the instance xi by L after training on data Dc. Definition: The inductive bias of L is any minimal set of assertions B such that for any target concept c and corresponding training examples Dc where A B means A logically entails B )] , ( ) )[( ( c i i c i D x L x D B X x    
  • 22. 22 Inductive Systems and Equivalent Deductive Systems Candidate Elimination Algorithm Using Hypothesis Space H Theorem Prover Training examples Training examples New instance New instance Assertion "H contains hypothesis" Classification of new instance, or "don't know" Classification of new instance, or "don't know" Inductive System Equivalent Deductive System