Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Machine Learning Lecture 2: Concept Learning and Version Spaces 1.

Slides:



Advertisements
Similar presentations
Concept Learning and the General-to-Specific Ordering
Advertisements

2. Concept Learning 2.1 Introduction
1 Machine Learning: Lecture 3 Decision Tree Learning (Based on Chapter 3 of Mitchell T.., Machine Learning, 1997)
Concept Learning DefinitionsDefinitions Search Space and General-Specific OrderingSearch Space and General-Specific Ordering The Candidate Elimination.
CS 484 – Artificial Intelligence1 Announcements Project 1 is due Tuesday, October 16 Send me the name of your konane bot Midterm is Thursday, October 18.
Università di Milano-Bicocca Laurea Magistrale in Informatica
1 Chapter 10 Introduction to Machine Learning. 2 Chapter 10 Contents (1) l Training l Rote Learning l Concept Learning l Hypotheses l General to Specific.
Machine Learning II Decision Tree Induction CSE 473.
Decision Trees. DEFINE: Set X of Instances (of n-tuples x = ) –E.g., days decribed by attributes (or features): Sky, Temp, Humidity, Wind, Water, Forecast.
Chapter 2 - Concept learning
Machine Learning: Symbol-Based
MACHINE LEARNING. What is learning? A computer program learns if it improves its performance at some task through experience (T. Mitchell, 1997) A computer.
Concept Learning and Version Spaces
Artificial Intelligence 6. Machine Learning, Version Space Method
Kansas State University Department of Computing and Information Sciences CIS 830: Advanced Topics in Artificial Intelligence Wednesday, January 19, 2001.
Computing & Information Sciences Kansas State University Lecture 01 of 42 Wednesday, 24 January 2008 William H. Hsu Department of Computing and Information.
Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Friday, 25 January 2008 William.
Machine Learning Version Spaces Learning. 2  Neural Net approaches  Symbolic approaches:  version spaces  decision trees  knowledge discovery  data.
CS 484 – Artificial Intelligence1 Announcements List of 5 source for research paper Homework 5 due Tuesday, October 30 Book Review due Tuesday, October.
CS 478 – Tools for Machine Learning and Data Mining The Need for and Role of Bias.
For Friday Read chapter 18, sections 3-4 Homework: –Chapter 14, exercise 12 a, b, d.
1 Machine Learning What is learning?. 2 Machine Learning What is learning? “That is what learning is. You suddenly understand something you've understood.
Machine Learning Chapter 11.
Machine Learning CSE 681 CH2 - Supervised Learning.
Kansas State University Department of Computing and Information Sciences CIS 830: Advanced Topics in Artificial Intelligence Wednesday, January 19, 2000.
General-to-Specific Ordering. 8/29/03Logic Based Classification2 SkyAirTempHumidityWindWaterForecastEnjoySport SunnyWarmNormalStrongWarmSameYes SunnyWarmHighStrongWarmSameYes.
Machine Learning Chapter 2. Concept Learning and The General-to-specific Ordering Gun Ho Lee Soongsil University, Seoul.
1 Concept Learning By Dong Xu State Key Lab of CAD&CG, ZJU.
机器学习 陈昱 北京大学计算机科学技术研究所 信息安全工程研究中心. 课程基本信息  主讲教师:陈昱 Tel :  助教:程再兴, Tel :  课程网页:
Machine Learning Chapter 2. Concept Learning and The General-to-specific Ordering Tom M. Mitchell.
Kansas State University Department of Computing and Information Sciences CIS 830: Advanced Topics in Artificial Intelligence Monday, January 22, 2001 William.
Chapter 2: Concept Learning and the General-to-Specific Ordering.
Machine Learning Chapter 5. Artificial IntelligenceChapter 52 Learning 1. Rote learning rote( โรท ) n. วิถีทาง, ทางเดิน, วิธีการตามปกติ, (by rote จากความทรงจำ.
CpSc 810: Machine Learning Concept Learning and General to Specific Ordering.
Concept Learning and the General-to-Specific Ordering 이 종우 자연언어처리연구실.
Outline Inductive bias General-to specific ordering of hypotheses
Overview Concept Learning Representation Inductive Learning Hypothesis
CS Machine Learning 15 Jan Inductive Classification.
1 Universidad de Buenos Aires Maestría en Data Mining y Knowledge Discovery Aprendizaje Automático 2-Concept Learning (1/3) Eduardo Poggi
Kansas State University Department of Computing and Information Sciences CIS 798: Intelligent Systems and Machine Learning Thursday, August 26, 1999 William.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 34 of 41 Wednesday, 10.
Machine Learning: Lecture 2
Machine Learning Concept Learning General-to Specific Ordering
Kansas State University Department of Computing and Information Sciences CIS 690: Implementation of High-Performance Data Mining Systems Thursday, 20 May.
CS 8751 ML & KDDComputational Learning Theory1 Notions of interest: efficiency, accuracy, complexity Probably, Approximately Correct (PAC) Learning Agnostic.
CS464 Introduction to Machine Learning1 Concept Learning Inducing general functions from specific training examples is a main issue of machine learning.
Concept Learning and The General-To Specific Ordering
Computational Learning Theory Part 1: Preliminaries 1.
Concept learning Maria Simi, 2011/2012 Machine Learning, Tom Mitchell Mc Graw-Hill International Editions, 1997 (Cap 1, 2).
Machine Learning Chapter 7. Computational Learning Theory Tom M. Mitchell.
Chapter 2 Concept Learning
Computational Learning Theory
Concept Learning Machine Learning by T. Mitchell (McGraw-Hill) Chp. 2
CSE543: Machine Learning Lecture 2: August 6, 2014
CS 9633 Machine Learning Concept Learning
Analytical Learning Discussion (4 of 4):
Machine Learning Chapter 2
Introduction to Machine Learning Algorithms in Bioinformatics: Part II
Ordering of Hypothesis Space
Machine Learning: Lecture 3
Concept Learning.
Concept learning Maria Simi, 2010/2011.
IES 511 Machine Learning Dr. Türker İnce (Lecture notes by Prof. T. M
Concept Learning Berlin Chen 2005 References:
Machine Learning Chapter 2
Implementation of Learning Systems
Version Space Machine Learning Fall 2018.
Machine Learning Chapter 2
Presentation transcript:

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Machine Learning Lecture 2: Concept Learning and Version Spaces 1

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Concept Learning Much of learning involves acquiring general concepts from specific training examples Concept: subset of objects from some space Concept learning: Defining a function that specifies which elements are in the concept set. 2

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 A Concept Let there be a set of objects, X. X = { White Fang, Scooby Doo, Wile E, Lassie } A concept C is… A subset of X C = dogs = {Lassie, Scooby Doo} A function that returns 1 only for elements in the concept C(Lassie) = 1, C(Wile E) = 0 3

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Instance Representation Represent an object (or instance) as an n-tuple of attributes Example: Days (6-tuples) SkyTempHumidWindWaterForecast sunnywarmnormalstrongwarmsame sunnywarmhighstrongwarmsame rainycoldhighstrongwarmchange sunnywarmhighstrongcoolchange 4

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Example Concept Function “Days on which my friend Aldo enjoys his favorite water sport” SkyTempHumidWindWaterForecastC(x) sunnywarmnormalstrongwarmsame1 sunnywarmhighstrongwarmsame1 rainycoldhighstrongwarmchange0 sunnywarmhighstrongcoolchange1 INPUT OUTPUT 5

Hypothesis Spaces Hypothesis Space H: subset of all possible concepts For learning, we restrict ourselves to H –H may be only a small subset of all possible concepts (this turns out to be important – more later)

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Example: MC2 Hypothesis Space MC2 (Mitchell, Chapter 2) hypothesis space –Hypothesis h is a conjunction of constraints on attributes Each constraint can be: –A specific value : e.g. Water=Warm –A don’t care value : e.g. Water=? –No value allowed: e.g. Water=Ø Instances x that satisfy the constraints of h have h(x) = 1, otherwise h(x) = 0 Example hypotheses: SkyTempHumidWindWaterForecast sunny????? ?warm???same 7

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 GIVEN: Instances X –E.g., days decribed by attributes: Sky, Temp, Humidity, Wind, Water, Forecast Target function c: E.g., EnjoySport X  {0,1} Hypothesis space H –E.g. MC2, conjunction of literals: Training examples D –positive and negative examples of the target function:,…, FIND: A hypothesis h in H such that h(x)=c(x) for all x in D. Concept Learning Task 8

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 GIVEN: Instances X –E.g., days decribed by attributes: Sky, Temp, Humidity, Wind, Water, Forecast Target function c: E.g., EnjoySport X  {0,1} Hypothesis space H –E.g. MC2, conjunction of literals: Training examples D –positive and negative examples of the target function:,…, FIND: A hypothesis h in H such that h(x)=c(x) for all x in D. Concept Learning Task 9

Northwestern University Fall 2007 Machine Learning EECS 349, Bryan Pardo Inductive Learning Hypothesis Any hypothesis found to approximate the target function well over the training examples, will also approximate the target function well over the unobserved examples.

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Number of Instances, Concepts, Hypotheses Sky: Sunny, Cloudy, Rainy AirTemp: Warm, Cold Humidity: Normal, High Wind: Strong, Weak Water: Warm, Cold Forecast: Same, Change distinct instances : distinct concepts: syntactically distinct hypotheses in MC2: semantically distinct hypotheses in MC2: Number of possible hypothesis spaces: 3*2*2*2*2*2 = *4*4*4*4*4= *3*3*3*3*3=

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Mammal Concept Generality A concept P is more general than or equal to another concept Q iff the set of instances represented by P includes the set of instances represented by Q. Canine Wolf Pig Dog White_fang Lassie Scooby_doo Wilbur Charlotte 12

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 General to Specific Order Consider two hypotheses: –h 1 = –h 2 = Definition: h j is more general than or equal to h k iff: This imposes a partial order on a hypothesis space. 13

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Instance, Hypotheses and ”generality” x 1 = x 2 = h 1 = h 2 = h 3 = Instances x2x2 x1x1 Hypotheses h2h2 h3h3 h1h1 h 2  h 1 h 2  h 3 specific general 14

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Find-S Algorithm 1.Initialize h to the most specific hypothesis in H 2. For each positive training instance x: –For each attribute constraint a i in h If the constraint is satisfied by x, do nothing else replace a i in h by the next more general constraint that is satisfied by x 3. Output hypothesis h 15

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Hypothesis Space Search by Find-S InstancesHypotheses specific general h0h0 h 0 = h1h1 x 1 = + x1x1 h 1 =< Sunny,Warm,Normal, Strong,Warm,Same> x 3 = - x3x3 h 2,3 x 2 = + x2x2 h 2,3 =< Sunny,Warm,?, Strong,Warm,Same> h4h4 x 4 = + x4x4 h 4 =< Sunny,Warm,?, Strong,?,?> 16

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Properties of Find-S When hypothesis space described by constraints on attributes (e.g., MC2) –Find-S will output the most specific hypothesis within H that is consistent with the positve training examples 17

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Complaints about Find-S Ignores negative training examples Why prefer the most specific hypothesis? Can’t tell if the learner has converged to the target concept, in the sense that it is unable to determine whether it has found the only hypothesis consistent with the training examples. 18

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Version Spaces Hypothesis h is consistent with a set of training examples D of the target concept c iff h(x)=c(x) for each training example in D. A version space : all the hypotheses that are consistent with the training examples. Imposing a partial order (like the  one) on the version space lets us learn concepts in an organized way. 19

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 List-Then Eliminate Algorithm 1. VersionSpace  a list containing every hypothesis in H 2. For each training example remove from VersionSpace any hypothesis that is inconsistent with the training example h(x)  c(x) 3. Output the list of hypotheses in VersionSpace 20

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Example Version Space { } S: {,, } G: x 1 = + x 2 = + x 3 = - x 4 = + 21

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Representing Version Spaces The general boundary, G, of version space VS H,D is the set of maximally general members. The specific boundary, S, of version space VS H,D is the set of maximally specific members. Every member of the version space lies between these boundaries 22

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Candidate Elimination Algorithm 23

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Candidate-Elimination Algorithm –When does this halt? –If S and G are both singleton sets, then: if they are identical, output value and halt. if they are different, the training cases were inconsistent. Output this and halt. –Else continue accepting new training examples. 24

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Example Candidate Elimination { } S: { } G: { } S: { } G: { } S: { } G: x 1 = + x 2 = + 25

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Example Candidate Elimination { } S: { } G: { } S: {,, } G: { } S: {, } G: x 3 = - x 4 = + 26

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Example Candidate Elimination Instance space: integer points in the x,y plane with 0  x,y  10 hypothesis space : rectangles, that means hypotheses are of the form a  x  b, c  y  d, assume ab c d 27

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Example Candidate Elimination examples = { ø } G={0,10,0,10} S={ ø } G 28

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Example Candidate Elimination examples = {(3,4),+} G={(0,10,0,10)} S={(3,3,4,4)} G + S 29

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Classification of Unseen Data { } S: {,, } G: x 5 = x 6 = x 7 = x 8 = + 6/0 - 0/6 ? 3/3 ? 2/4 30

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Inductive Leap + How can we justify classifying the new example as positive? Since S is the specific boundary all other hypotheses in the version space are more general. So if the example satifies S it will also satisfy every other hypothesis in VS. new example inductive bias: Concept c can be described by a conjunction of literals. S : 31

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 What Example to Query Next? What would be a good query for the learner to pose at this point? Choose an instance that is classified positive by some of the hypotheses and negative by the others. If the example is positive S can be generalized, if it is negative G can be specialized. { } S: {,, } G: 32

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Biased Hypothesis Space Our hypothesis space is unable to represent a simple disjunctive target concept : (Sky=Sunny) v (Sky=Cloudy) x 1 = + S 1 : { } x 2 = + S 2 : { } x 3 = - S 3 : {} The third example x 3 contradicts the already overly general hypothesis space specific boundary S 2. 33

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Unbiased Learner Idea: Choose H that expresses every teachable concept, that means H is the set of all possible subsets of X |X|=96 => |H|=2 96 ~ distinct concepts H = disjunctions, conjunctions, negations v H surely contains the target concept. 34

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Unbiased Learner Assume positive examples (x 1, x 2, x 3 ) and negative examples (x 4, x 5 ) S : { (x 1 v x 2 v x 3 ) } G : {  (x 4 v x 5 ) } How would we classify some new instance x 6 ? For any instance not in the training examples half of the version space says + the other half says – => To learn the target concept one would have to present every single instance in X as a training example (Rote learning) 35

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Three Learners with Different Biases Rote learner: Store examples, classify x if and only if it matches a previously observed example. –No inductive bias Version space candidate elimination algorithm. –Bias: Hypothesis space contains target concept. Find-S –Bias: The hypothesis space contains the target concept & all instances are negative instances unless the opposite is entailed by other knowledge. 36

Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Summary Concept learning as search. General-to-Specific partial ordering of hypotheses Inductive learning algorithms can classify unseen examples only because of inductive bias An unbiased learner cannot make inductive leaps to classify unseen examples. 37