• What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010...

54
1 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning What is learning?

Transcript of • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010...

Page 1: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

1

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Machine Learning• What is learning?

Page 2: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

2

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Machine Learning• What is learning?

• “That is what learning is. You suddenly understand something you've understood all your life, but in a new way.”(Doris Lessing – 2007 Nobel Prize in Literature)

Page 3: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

3

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Machine Learning• How to construct programs that automatically

improve with experience.

Page 4: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

4

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Machine Learning• How to construct programs that automatically

improve with experience.

• Learning problem:– Task T– Performance measure P– Training experience E

Page 5: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

5

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Machine Learning• Chess game:

– Task T: playing chess games– Performance measure P: percent of games won against

opponents– Training experience E: playing practice games againts itself

Page 6: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

6

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Machine Learning• Handwriting recognition:

– Task T: recognizing and classifying handwritten words– Performance measure P: percent of words correctly

classified – Training experience E: handwritten words with given

classifications

Page 7: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

7

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Designing a Learning System• Choosing the training experience:

– Direct or indirect feedback– Degree of learner's control – Representative distribution of examples

Page 8: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

8

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Designing a Learning System

• Choosing the target function:– Type of knowledge to be learned– Function approximation

Page 9: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

9

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Designing a Learning System

• Choosing a representation for the target function:– Expressive representation for a close function approximation– Simple representation for simple training data and learning

algorithms

Page 10: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

10

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Designing a Learning System• Choosing a function approximation algorithm

(learning algorithm)

Page 11: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

11

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Designing a Learning System

• Chess game:– Task T: playing chess games– Performance measure P: percent of games won against

opponents– Training experience E: playing practice games againts itself– Target function: V: Board → R

Page 12: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

12

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Designing a Learning System• Chess game:

– Target function representation:V^(b) = w0 + w1x1 + w2x2 + w3x3 + w4x4 + w5x5 + w6x6

x1: the number of black pieces on the boardx2: the number of red pieces on the boardx3: the number of black kings on the boardx4: the number of red kings on the boardx5: the number of black pieces threatened by redx6: the number of red pieces threatened by black

Page 13: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

13

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Designing a Learning System• Chess game:

– Function approximation algorithm:(<x1 = 3, x2 = 0, x3 = 1, x4 = 0, x5 = 0, x6 = 0>, 100)

x1: the number of black pieces on the boardx2: the number of red pieces on the boardx3: the number of black kings on the boardx4: the number of red kings on the boardx5: the number of black pieces threatened by redx6: the number of red pieces threatened by black

Page 14: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

14

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Designing a Learning System• What is learning?

Page 15: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

15

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Designing a Learning System• Learning is an (endless) generalization or induction

process.

Page 16: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

16

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Designing a Learning System

ExperimentGenerator

PerformanceSystem Generalizer

Critic

New problem(initial board)

Solution trace(game history)

Hypothesis(V^)

Training examples{(b1, V1), (b2, V2), ...}

Page 17: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

17

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Issues in Machine Learning• What learning algorithms to be used?• How much training data is sufficient?• When and how prior knowledge can guide the learning process?• What is the best strategy for choosing a next training experience?• What is the best way to reduce the learning task to one or more

function approximation problems?• How can the learner automatically alter its representation to

improve its learning ability?

Page 18: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

18

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Example

YesChangeCoolStrongHighWarmSunny4NoChangeWarmStrongHighColdRainy3YesSameWarmStrongHighWarmSunny2YesSameWarmStrongNormalWarmSunny1

EnjoySportForecastWaterWindHumidityAirTempSkyExampleExperience

Prediction????ChangeWarmStrongHighColdRainy5

????SameCoolStrongLowWarmSunny7????SameWarmStrongNormalWarmSunny6

Low Weak

Page 19: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

19

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Example• Learning problem:

– Task T: classifying days on which my friend enjoys water sport– Performance measure P: percent of days correctly classified– Training experience E: days with given attributes and classifications

Page 20: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

20

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Concept Learning• Inferring a boolean-valued function from training

examples of its input (instances) and output (classifications).

Page 21: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

21

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Concept Learning• Learning problem:

– Target concept: a subset of the set of instances Xc: X →→→→ {0, 1}

– Target function: Sky ×××× AirTemp ×××× Humidity ×××× Wind ×××× Water ×××× Forecast →→→→ {Yes, No}

– Hypothesis: Characteristics of all instances of the concept to be learned ≡≡≡≡ Constraints on instance attributesh: X →→→→ {0, 1}

Page 22: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

22

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Concept Learning• Satisfaction:

h(x) = 1 iff x satisfies all the constraints of hh(x) = 0 otherwsie

• Consistency: h(x) = c(x) for every instance x of the training examples

• Correctness: h(x) = c(x) for every instance x of X

Page 23: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

23

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Concept Learning• How to represent a hypothesis function?

Page 24: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

24

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Concept Learning• Hypothesis representation (constraints on instance attributes):

<Sky, AirTemp, Humidity, Wind, Water, Forecast>– ?: any value is acceptable– single required value– ∅∅∅∅: no value is acceptable

Page 25: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

25

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Concept Learning• General-to-specific ordering of hypotheses:

hj ≥g hk iff ∀∀∀∀x∈∈∈∈X: hk(x) = 1 ⇒⇒⇒⇒ hj(x) = 1

Specific

General

h1 = <Sunny, ?, ?, Strong, ? , ?>h2 = <Sunny, ?, ?, ? , ? , ?>h3 = <Sunny, ?, ?, ? , Cool, ?>

H

Lattice(Partial order)

h1 h3h2

Page 26: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

26

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

FIND-S

YesChangeCoolStrongHighWarmSunny4

NoChangeWarmStrongHighColdRainy3YesSameWarmStrongHighWarmSunny2YesSameWarmStrongNormalWarmSunny1

EnjoySportForecastWaterWindHumidityAirTempSkyExample

h = < ∅ , ∅ , ∅ , ∅ , ∅ , ∅ >h = <Sunny, Warm, Normal, Strong, Warm, Same>h = <Sunny, Warm, ? , Strong, Warm, Same>h = <Sunny, Warm, ? , Strong, ? , ? >

Page 27: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

27

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

FIND-S• Initialize h to the most specific hypothesis in H: • For each positive training instance x:

For each attribute constraint ai in h:If the constraint is not satisfied by xThen replace ai by the next more general

constraint satisfied by x• Output hypothesis h

Page 28: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

28

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

FIND-S

YesChangeCoolStrongHighWarmSunny4

NoChangeWarmStrongHighColdRainy3YesSameWarmStrongHighWarmSunny2YesSameWarmStrongNormalWarmSunny1

EnjoySportForecastWaterWindHumidityAirTempSkyExample

h = <Sunny, Warm, ? , Strong, ? , ? >Prediction

NoNoNoNoChangeWarmStrongHighColdRainy5

YesYesYesYesSameCoolStrongLowWarmSunny7YesYesYesYesSameWarmStrongNormalWarmSunny6

Page 29: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

29

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

FIND-S• The output hypothesis is the most specific one that

satisfies all positive training examples.

Page 30: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

30

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

FIND-S• The result is consistent with the positive training examples.

Page 31: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

31

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

FIND-S• Is the result is consistent with the negative training

examples?

Page 32: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

32

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

FIND-S

YesChangeCoolStrongHighWarmSunny4

NoNoNoNoChangeChangeChangeChangeCoolCoolCoolCoolStrongStrongStrongStrongNormalNormalNormalNormalWarmWarmWarmWarmSunnySunnySunnySunny5555

NoChangeWarmStrongHighColdRainy3YesSameWarmStrongHighWarmSunny2YesSameWarmStrongNormalWarmSunny1

EnjoySportForecastWaterWindHumidityAirTempSkyExample

h = <Sunny, Warm, ? , Strong, ? , ? >

Page 33: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

33

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

FIND-S• The result is consistent with the negative training examples

if the target concept is contained in H (and the training examples are correct).

Page 34: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

34

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

FIND-S• The result is consistent with the negative training examples

if the target concept is contained in H (and the training examples are correct).

• Sizes of the space:– Size of the instance space: |X| = 3.2.2.2.2.2 = 96 – Size of the concept space C = 2|X| = 296

– Size of the hypothesis space H = (4.3.3.3.3.3) + 1 = 973 << 296

⇒⇒⇒⇒ The target concept (in C) may not be contained in H.

Page 35: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

35

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

FIND-S• Questions:

– Has the learner converged to the target concept, as there can be several consistent hypotheses (with both positive and negative training examples)?

– Why the most specific hypothesis is preferred?– What if there are several maximally specific consistent

hypotheses?– What if the training examples are not correct?

Page 36: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

36

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

List-then-Eliminate Algorithm• Version space: a set of all hypotheses that are

consistent with the training examples.

• Algorithm:– Initial version space = set containing every hypothesis in H– For each training example <x, c(x)>, remove from the version

space any hypothesis h for which h(x) ≠≠≠≠ c(x)– Output the hypotheses in the version space

Page 37: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

37

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

List-then-Eliminate Algorithm• Requires an exhaustive enumeration of all hypotheses

in H

Page 38: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

38

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Compact Representation of Version Space

• G (the generic boundary): set of the most generichypotheses of H consistent with the training data D:

G = {g∈∈∈∈H | consistent(g, D) ∧∧∧∧ ¬∃¬∃¬∃¬∃g’∈∈∈∈H: g’ >>>>g g ∧∧∧∧ consistent(g’, D)}

• S (the specific boundary): set of the most specifichypotheses of H consistent with the training data D:

S = {s∈H | consistent(s, D) ∧∧∧∧ ¬∃¬∃¬∃¬∃s’∈∈∈∈H: s >>>>g s’ ∧∧∧∧ consistent(s’, D)}

Page 39: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

39

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Compact Representation of Version Space

• Version space = <G, S> = {h∈∈∈∈H | ∃∃∃∃g∈∈∈∈G ∃∃∃∃s∈∈∈∈S: g ≥≥≥≥g h ≥≥≥≥g s}

S

G

Page 40: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

40

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Candidate-Elimination Algorithm

S0 = {<∅, ∅, ∅, ∅, ∅, ∅>}G0 = {<?, ?, ?, ?, ?, ?>}

S1 = {<Sunny, Warm, Normal, Strong, Warm, Same>}G1 = {<?, ?, ?, ?, ?, ?>}

S2 = {<Sunny, Warm, ?, Strong, Warm, Same>}G2 = {<?, ?, ?, ?, ?, ?>}

S3 = {<Sunny, Warm, ?, Strong, Warm, Same>}G3 = {<Sunny, ?, ?, ?, ?, ?>, <?, Warm, ?, ?, ?, ?>, <?, ?, ?, ?, ?, Same>}

S4 = {<Sunny, Warm, ?, Strong, ?, ?>}G4 = {<Sunny, ?, ?, ?, ?, ?>, <?, Warm, ?, ?, ?, ?>}

YesChangeCoolStrongHighWarmSunny4NoChangeWarmStrongHighColdRainy3YesSameWarmStrongHighWarmSunny2YesSameWarmStrongNormalWarmSunny1

EnjoySportForecastWaterWindHumidityAirTempSkyExample

S

G

Page 41: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

41

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Candidate-Elimination AlgorithmS4 = {<Sunny, Warm, ?, Strong, ?, ?>}

<Sunny, ?, ?, Strong, ?, ?> <Sunny, Warm, ?, ?, ?, ?> <?, Warm, ?, Strong, ?, ?>

G4 = {<Sunny, ?, ?, ?, ?, ?>, <?, Warm, ?, ?, ?, ?>}

Page 42: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

42

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Candidate-Elimination Algorithm• Initialize G to the set of maximally general hypotheses

in H

• Initialize S to the set of maximally specific hypotheses in H

Page 43: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

43

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Candidate-Elimination Algorithm• For each positive example d:

– Remove from G any hypothesis inconsistent with d– For each s in S that is inconsistent with d:

Remove s from SAdd to S all least generalizations h of s, such that h is consistent with d and some hypothesis in G is more general than hRemove from S any hypothesis that is more general than another hypothesis in S

Page 44: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

44

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Candidate-Elimination Algorithm• For each negative example d:

– Remove from S any hypothesis inconsistent with d– For each g in G that is inconsistent with d:

Remove g from GAdd to G all least specializations h of g, such that h is consistent with d and some hypothesis in S is more specific than hRemove from G any hypothesis that is more specific than another hypothesis in G

Page 45: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

45

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Candidate-Elimination Algorithm• The version space will converge toward the correct

target concepts if:– H contains the correct target concept– There are no errors in the training examples

• A training instance to be requested next should discriminate among the alternative hypotheses in the current version space:

Page 46: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

46

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Candidate-Elimination Algorithm• Partially learned concept can be used to classify new

instances using the majority rule.S4 = {<Sunny, Warm, ?, Strong, ?, ?>}

<Sunny, ?, ?, Strong, ?, ?> <Sunny, Warm, ?, ?, ?, ?> <?, Warm, ?, Strong, ?, ?>

G4 = {<Sunny, ?, ?, ?, ?, ?>, <?, Warm, ?, ?, ?, ?>}

????SameCoolStrongHighWarmRainy5

⊕⊕⊕⊕

����

⊕⊕⊕⊕

����

����

����

Page 47: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

47

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Inductive Bias• Size of the instance space: |X| = 3.2.2.2.2.2 = 96

• Number of possible concepts = 2|X| = 296

• Size of H = (4.3.3.3.3.3) + 1 = 973 << 296

Page 48: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

48

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Inductive Bias• Size of the instance space: |X| = 3.2.2.2.2.2 = 96

• Number of possible concepts = 2|X| = 296

• Size of H = (4.3.3.3.3.3) + 1 = 973 << 296

⇒ a biased hypothesis space

Page 49: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

49

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Inductive Bias• An unbiased hypothesis space H’ that can represent

every subset of the instance space X: Propositional logic sentences

• Positive examples: x1, x2, x3Negative examples: x4, x5

h(x) ≡≡≡≡ (x = x1) ∨∨∨∨ (x = x2) ∨∨∨∨ (x = x3) ≡≡≡≡ x1 ∨∨∨∨ x2∨∨∨∨ x3

Page 50: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

50

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Inductive Bias

x1∨ x2 ∨ x3 ∨ x6

x1∨ x2 ∨ x3

Any new instance x is classified positive by half of the version space, and negative by the other half ⇒⇒⇒⇒ not classifiable

x1∨ x2 ∨ x3 ∨ x6 ∨ … (not including x4 and x5)

Page 51: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

51

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Inductive Bias

?CheapFamousWed9

NoCheapFamousSat8

YesCheapInfamousThu6NoExpensiveFamousSun5YesModerateInfamousWed4NoCheapInfamousSun3NoModerateFamousSat2

YesExpensiveFamousTue7

Expensive

ExpensivePrice

?InfamousSat10

YesFamousMon1EasyTicketActorDayExample

Page 52: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

52

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Inductive Bias

NoHighBad2YesLowGood1BuyPriceQualityExample

?LowBad4?HighGood3

Page 53: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

53

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

Inductive Bias• A learner that makes no prior assumptions regarding

the identity of the target concept cannot classify any unseen instances.

Page 54: • What is learning - University of Technologytru/KB-SYSTEMS/machine-learning.pdf2 05 January 2010 Cao Hoang Tru CSE Faculty - HCMUT Machine Learning • What is learning ? • “That

54

05 January 2010

Cao Hoang Tru

CSE Faculty - HCMUT

HomeworkExercises 2-1 → 2.5 (Chapter 2, ML textbook)