Fundamentals of Concept Learning

Similar documents
CSCE 478/878 Lecture 2: Concept Learning and the General-to-Specific Ordering

Concept Learning through General-to-Specific Ordering

Outline. [read Chapter 2] Learning from examples. General-to-specic ordering over hypotheses. Version spaces and candidate elimination.

[read Chapter 2] [suggested exercises 2.2, 2.3, 2.4, 2.6] General-to-specific ordering over hypotheses

Version Spaces.

Concept Learning.

Concept Learning Mitchell, Chapter 2. CptS 570 Machine Learning School of EECS Washington State University

Outline. Training Examples for EnjoySport. 2 lecture slides for textbook Machine Learning, c Tom M. Mitchell, McGraw Hill, 1997

Question of the Day? Machine Learning 2D1431. Training Examples for Concept Enjoy Sport. Outline. Lecture 3: Concept Learning

Overview. Machine Learning, Chapter 2: Concept Learning

Machine Learning 2D1431. Lecture 3: Concept Learning

Concept Learning. Space of Versions of Concepts Learned

Introduction to machine learning. Concept learning. Design of a learning system. Designing a learning system

Lecture 2: Foundations of Concept Learning

Concept Learning. Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University.

Concept Learning. Berlin Chen References: 1. Tom M. Mitchell, Machine Learning, Chapter 2 2. Tom M. Mitchell s teaching materials.

EECS 349: Machine Learning

BITS F464: MACHINE LEARNING

Computational Learning Theory

Computational Learning Theory

Computational Learning Theory

Intuition Bayesian Classification

Answers Machine Learning Exercises 2

Topics. Concept Learning. Concept Learning Task. Concept Descriptions

MVT and Rolle s Theorem

Function Composition and Chain Rules

Efficient algorithms for for clone items detection

EECS 349: Machine Learning Bryan Pardo

Computational Learning Theory

Introduction to Derivatives

Regularized Regression

Continuity and Differentiability Worksheet

Machine Learning. Computational Learning Theory. Le Song. CSE6740/CS7641/ISYE6740, Fall 2012

2.11 That s So Derivative

Bob Brown Math 251 Calculus 1 Chapter 3, Section 1 Completed 1 CCBC Dundalk

Machine Learning. Computational Learning Theory. Eric Xing , Fall Lecture 9, October 5, 2016

NUMERICAL DIFFERENTIATION. James T. Smith San Francisco State University. In calculus classes, you compute derivatives algebraically: for example,

Notes on wavefunctions II: momentum wavefunctions

Data Mining and Machine Learning

Section 3: The Derivative Definition of the Derivative

CS340: Bayesian concept learning. Kevin Murphy Based on Josh Tenenbaum s PhD thesis (MIT BCS 1999)

2.3 Product and Quotient Rules

7.1 Using Antiderivatives to find Area

Introduction to Machine Learning

Preface. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Lecture 10: Carnot theorem

Solve exponential equations in one variable using a variety of strategies. LEARN ABOUT the Math. What is the half-life of radon?

LIMITS AND DERIVATIVES CONDITIONS FOR THE EXISTENCE OF A LIMIT

Online Learning: Bandit Setting

Section 2.7 Derivatives and Rates of Change Part II Section 2.8 The Derivative as a Function. at the point a, to be. = at time t = a is

1. State whether the function is an exponential growth or exponential decay, and describe its end behaviour using limits.

Financial Econometrics Prof. Massimo Guidolin

1. Questions (a) through (e) refer to the graph of the function f given below. (A) 0 (B) 1 (C) 2 (D) 4 (E) does not exist

158 Calculus and Structures

Exam 1 Review Solutions

2.8 The Derivative as a Function

Lab 6 Derivatives and Mutant Bacteria

Math 212-Lecture 9. For a single-variable function z = f(x), the derivative is f (x) = lim h 0

Decision Tree Learning

Differentiation in higher dimensions

Section 2: The Derivative Definition of the Derivative

Introduction to Machine Learning. Recitation 8. w 2, b 2. w 1, b 1. z 0 z 1. The function we want to minimize is the loss over all examples: f =

Decision Tree Learning and Inductive Inference

Numerical Differentiation

Derivatives of Exponentials

THE IDEA OF DIFFERENTIABILITY FOR FUNCTIONS OF SEVERAL VARIABLES Math 225

MTH-112 Quiz 1 Name: # :

232 Calculus and Structures

HOMEWORK HELP 2 FOR MATH 151

1. Which one of the following expressions is not equal to all the others? 1 C. 1 D. 25x. 2. Simplify this expression as much as possible.

Tutorial 6. By:Aashmeet Kalra

INTRODUCTION TO CALCULUS LIMITS

1 Limits and Continuity

Recall from our discussion of continuity in lecture a function is continuous at a point x = a if and only if

Lecture 3: Decision Trees

1 Calculus. 1.1 Gradients and the Derivative. Q f(x+h) f(x)

Copyright c 2008 Kevin Long

Classification (Categorization) CS 391L: Machine Learning: Inductive Classification. Raymond J. Mooney. Sample Category Learning Problem

Lecture 3: Decision Trees

Chapter 2 Limits and Continuity

CSCE 478/878 Lecture 6: Bayesian Learning

Consider a function f we ll specify which assumptions we need to make about it in a minute. Let us reformulate the integral. 1 f(x) dx.

Machine Learning 2007: Slides 1. Instructor: Tim van Erven Website: erven/teaching/0708/ml/

Learning Decision Trees

COMPSCI 514: Algorithms for Data Science

Lecture XVII. Abstract We introduce the concept of directional derivative of a scalar function and discuss its relation with the gradient operator.

Math 161 (33) - Final exam

2.1 THE DEFINITION OF DERIVATIVE

Introduction to Machine Learning

The derivative function

MAT 1339-S14 Class 2

Definition of the Derivative

EECS 349:Machine Learning Bryan Pardo

Integral Calculus, dealing with areas and volumes, and approximate areas under and between curves.

1 1. Rationalize the denominator and fully simplify the radical expression 3 3. Solution: = 1 = 3 3 = 2

Combining functions: algebraic methods

MAT 145. Type of Calculator Used TI-89 Titanium 100 points Score 100 possible points

Chapters 19 & 20 Heat and the First Law of Thermodynamics

Lesson 6: The Derivative

AVL trees. AVL trees

Transcription:

Aims 09s: COMP947 Macine Learning and Data Mining Fundamentals of Concept Learning Marc, 009 Acknowledgement: Material derived from slides for te book Macine Learning, Tom Mitcell, McGraw-Hill, 997 ttp://www-.cs.cmu.edu/~tom/mlbook.tml Tis lecture aims to develop your understanding of representing and searcing ypotesis spaces for concept learning. Following it you sould be able to: define a representation for concepts define a ypotesis space in terms of generality ordering on concepts describe an algoritm to searc a ypotesis space express te framework of version spaces describe an algoritm to searc a ypotesis space using te framework of version spaces explain te role of inductive bias in concept learning COMP947: Marc, 009 Fundamentals of Concept Learning: Slide Overview Concept Learning inferring a Boolean-valued function from training examples of its input and output. Learning from examples General-to-specific ordering over ypoteses Version spaces and candidate elimination algoritm Picking new examples Te need for inductive bias Training Examples for EnjoySport Sky Temp Humid Wind Water Forecst EnjoySpt Sunny Warm Normal Strong Warm Same Yes Sunny Warm Hig Strong Warm Same Yes Rainy Cold Hig Strong Warm Cange No Sunny Warm Hig Strong Cool Cange Yes Wat is te general concept? Note: simple approac assuming no noise, illustrates key concepts COMP947: Marc, 009 Fundamentals of Concept Learning: Slide COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 3

Many possible representations... Representing Hypoteses Here, is a conjunction of constraints on attributes. Given: Te Prototypical Concept Learning Task Instances X: Possible days, eac described by te attributes Eac constraint can be: a specific value (e.g., W ater = W arm) don t care (e.g., W ater =? ) no value allowed (e.g., Water= ) For example, Sky AirTemp Humid Wind Water Forecst Sunny?? Strong? Same Attribute Sky AirTemp Humid Wind Water Forecast Values Sunny, Cloudy, Rainy Warm, Cold Normal, Hig Strong, Weak Warm, Cool Same, Cange COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 4 COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 5 Te Prototypical Concept Learning Task Te inductive learning ypotesis Target function c: EnjoySport : X {0, } Hypoteses H: Conjunctions of literals. E.g.?, Cold, Hig,?,?,?. Training examples D: Positive and negative examples of te target function x, c(x ),... x m, c(x m ) Any ypotesis found to approximate te target function well over a sufficiently large set of training examples will also approximate te target function well over oter unobserved examples. Determine: A ypotesis in H suc tat (x) = c(x) for all x in D (usually called te target ypotesis). COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 6 COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 7

Concept Learning as Searc Question: Wat can be learned? Answer: (only) wat is in te ypotesis space How big is te ypotesis space for EnjoySport? Instance space Sky AirTemp... Forecast = 3 = 96 Concept Learning as Searc Hypotesis space Sky AirTemp... Forecast = 5 4 4 4 4 4 = 50 (semantically distinct only) = + (4 3 3 3 3 3) = 973 any ypotesis wit an constraint covers no instances, ence all are semantically equivalent. Te learning problem searcing a ypotesis space. How? COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 8 COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 9 Instances, Hypoteses, and More-General-Tan Instances X Hypoteses H Specific A generality order on ypoteses Definition: Let j and k be Boolean-valued functions defined over instances X. Ten j is more general tan or equal to k (written j g k ) if and only if x x 3 General ( x X)[( k (x) = ) ( j (x) = )] Intuitively, j is more general tan or equal to k if any instance satisfying k also satisfies j. x = <Sunny, Warm, Hig, Strong, Cool, Same> x = <Sunny, Warm, Hig, Ligt, Warm, Same> = <Sunny,?,?, Strong,?,?> = <Sunny,?,?,?,?,?> = <Sunny,?,?,?, Cool,?> 3 j is (strictly) more general tan k (written j > g k ) if and only if ( j g k ) ( k g j ). j is more specific tan k wen k is more general tan j. COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 0 COMP947: Marc, 009 Fundamentals of Concept Learning: Slide

Te Find-S Algoritm Hypotesis Space Searc by Find-S Instances X Hypoteses H. Initialize to te most specific ypotesis in H. For eac positive training instance x For eac attribute constraint a i in If te constraint a i in is satisfied by x Ten do noting Else replace a i in by te next more general constraint tat is satisfied by x - x 3 x + x+ x+ 4 x = <Sunny Warm Normal Strong Warm Same>, + x = <Sunny Warm Hig Strong Warm Same>, + x 3 = <Rainy Cold Hig Strong Warm Cange>, - x = <Sunny Warm Hig Strong Cool Cange>, + 4 0,3 4 Specific General = <,,,,, > 0 = <Sunny Warm Normal Strong Warm Same> = <Sunny Warm? Strong Warm Same> = <Sunny Warm? Strong Warm Same> 3 = <Sunny Warm? Strong?? > 4 COMP947: Marc, 009 Fundamentals of Concept Learning: Slide COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 3 Find-S - does it work? Complaints about Find-S Assume: a ypotesis c H describes target function c, and training data is error-free. By definition, c is consistent wit all positive training examples and can never cover a negative example. For eac generated by Find-S, c is more general tan or equal to. So can never cover a negative example. Can t tell weter it as learned concept learned ypotesis may not be te only consistent ypotesis Can t tell wen training data inconsistent cannot andle noisy data Picks a maximally specific (wy?) migt require maximally general COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 4 COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 5

Version Spaces Te List-Ten-Eliminate Algoritm A ypotesis is consistent wit a set of training examples D of target concept c if and only if (x) = c(x) for eac training example x, c(x) in D. Consistent(, D) ( x, c(x) D) (x) = c(x). V ersionspace a list containing every ypotesis in H. For eac training example, x, c(x) remove from V ersionspace any ypotesis for wic (x) c(x) 3. Output te list of ypoteses in V ersionspace Te version space, V S H,D, wit respect to ypotesis space H and training examples D, is te subset of ypoteses from H consistent wit all training examples in D. V S H,D { H Consistent(, D)} COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 6 COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 7 Example Version Space Representing Version Spaces S: { <Sunny, Warm,?, Strong,?,?> } Te General boundary, G, of version space V S H,D is te set of its maximally general members G: { <Sunny,?,?,?,?,?>, <?, Warm,?,?,?,?> } Te Specific boundary, S, of version space V S H,D is te set of its maximally specific members Every member of te version space lies between tese boundaries V S H,D = { H ( s S)( g G)(g s)} were x y means x is more general or equal to y COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 8 COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 9

Te Candidate Elimination Algoritm G maximally general ypoteses in H S maximally specific ypoteses in H For eac training example d, do If d is a positive example Remove from G any ypotesis inconsistent wit d For eac ypotesis s in S tat is not consistent wit d Remove s from S Add to S all minimal generalizations of s suc tat. is consistent wit d, and. some member of G is more general tan Remove from S any ypotesis tat is more general tan anoter ypotesis in S If d is a negative example Te Candidate Elimination Algoritm Remove from S any ypotesis inconsistent wit d For eac ypotesis g in G tat is not consistent wit d Remove g from G Add to G all minimal specializations of g suc tat. is consistent wit d, and. some member of S is more specific tan Remove from G any ypotesis tat is less general tan anoter ypotesis in G COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 0 COMP947: Marc, 009 Fundamentals of Concept Learning: Slide Example Trace Example Trace S 0 : {<Ø, Ø, Ø, Ø, Ø, Ø>} S 0 : { <,,,,, > } S : { <Sunny, Warm, Normal, Strong, Warm, Same> } S : { <Sunny, Warm,?, Strong, Warm, Same> } G 0, G, G : { <?,?,?,?,?,?>} G 0 : {<?,?,?,?,?,?>} Training examples:. <Sunny, Warm, Normal, Strong, Warm, Same>, Enjoy Sport = Yes. <Sunny, Warm, Hig, Strong, Warm, Same>, Enjoy Sport = Yes COMP947: Marc, 009 Fundamentals of Concept Learning: Slide COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 3

Example Trace Example Trace S, S 3 : { <Sunny, Warm,?, Strong, Warm, Same> } S 3 : { <Sunny, Warm,?, Strong, Warm, Same> } S 4 : { <Sunny, Warm,?, Strong,?,?>} G 3 : { <Sunny,?,?,?,?,?> <?, Warm,?,?,?,?> <?,?,?,?,?, Same> } G 4: { <Sunny,?,?,?,?,?> <?, Warm,?,?,?,?>} G : { <?,?,?,?,?,?> } G 3 : { <Sunny,?,?,?,?,?> <?, Warm,?,?,?,?> <?,?,?,?,?, Same> } Training Example: 3. <Rainy, Cold, Hig, Strong, Warm, Cange>, EnjoySport=No Training Example: 4.<Sunny, Warm, Hig, Strong, Cool, Cange>, EnjoySport = Yes COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 4 COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 5 Example Trace Wic Training Example Is Best To Coose Next? S 4 : { <Sunny, Warm,?, Strong,?,?>} S: { <Sunny, Warm,?, Strong,?,?> } G 4 : { <Sunny,?,?,?,?,?>, <?, Warm,?,?,?,?>} G: { <Sunny,?,?,?,?,?>, <?, Warm,?,?,?,?> } COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 6 COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 7

Wic Training Example To Coose Next? How Sould New Instances Be Classified? S: { <Sunny, Warm,?, Strong,?,?> } S: { <Sunny, Warm,?, Strong,?,?> } G: { <Sunny,?,?,?,?,?>, <?, Warm,?,?,?,?> } Sunny W arm Normal Ligt W arm Same G: { <Sunny,?,?,?,?,?>, <?, Warm,?,?,?,?> } Sunny Warm Normal Strong Cool Cange Rainy Cold Normal Ligt Warm Same Sunny Warm Normal Ligt Warm Same COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 8 COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 9 How Sould New Instances Be Classified? Wat Justifies tis Inductive Leap? S: { <Sunny, Warm,?, Strong,?,?> } + Sunny W arm Normal Strong Cool Cange + Sunny W arm Normal Ligt W arm Same S : Sunny W arm Normal??? G: { <Sunny,?,?,?,?,?>, <?, Warm,?,?,?,?> } Sunny Warm Normal Strong Cool Cange (6 + /0 ) Rainy Cold Normal Ligt Warm Same (0 + /6 ) Sunny Warm Normal Ligt Warm Same (3 + /3 ) Wy believe we can classify tis unseen instance? Sunny W arm Normal Strong W arm Same COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 30 COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 3

An UNBiased Learner Idea: Coose H tat expresses every teacable concept (i.e. H is te power set of X) Consider H = disjunctions, conjunctions, negations over previous H. E.g. Sunny W arm Normal???????? Cange Wat are S, G in tis case? S G Consider concept learning algoritm L instances X, target concept c Inductive Bias training examples D c = { x, c(x) } let L(x i, D c ) denote te classification assigned to te instance x i by L after training on data D c. Definition: Te inductive bias of L is any minimal set of assertions B suc tat for any target concept c and corresponding training examples D c ( x i X)[(B D c x i ) L(x i, D c )] were A B means A logically entails B COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 3 COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 33 Inductive Systems and Equivalent Deductive Systems Training examples New instance Training examples New instance Inductive system Candidate Elimination Algoritm Using Hypotesis Space H Equivalent deductive system Teorem Prover Classification of new instance, or "don t know" Classification of new instance, or "don t know" Tree Learners wit Different Biases. Rote learner: Store examples, Classify x iff it matces previously observed example.. Version space candidate elimination algoritm 3. Find-S Assertion " H contains te target concept" Inductive bias made explicit COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 34 COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 35

Summary Points. Concept learning as searc troug H. General-to-specific ordering over H 3. Version space candidate elimination algoritm 4. S and G boundaries caracterize learner s uncertainty 5. Learner can generate useful queries 6. Inductive leaps possible only if learner is biased 7. Inductive learners can be modelled by equivalent deductive systems [Suggested reading: Mitcell, Capter ] COMP947: Marc, 009 Fundamentals of Concept Learning: Slide 36