Università di Milano-Bicocca Laurea Magistrale in Informatica

Slides:



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

2. Concept Learning 2.1 Introduction
Concept Learning DefinitionsDefinitions Search Space and General-Specific OrderingSearch Space and General-Specific Ordering The Candidate Elimination.
Combining Inductive and Analytical Learning Ch 12. in Machine Learning Tom M. Mitchell 고려대학교 자연어처리 연구실 한 경 수
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.
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.
Adapted by Doug Downey from: Bryan Pardo, EECS 349 Fall 2007 Machine Learning Lecture 2: Concept Learning and Version Spaces 1.
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 Chapter 3. Decision Tree Learning
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.
CpSc 810: Machine Learning Decision Tree 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.
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
Computational Learning Theory IntroductionIntroduction The PAC Learning FrameworkThe PAC Learning Framework Finite Hypothesis SpacesFinite Hypothesis Spaces.
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.
Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Thursday, 25 January 2007 William.
Chapter 2 Concept Learning
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
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:

Università di Milano-Bicocca Laurea Magistrale in Informatica Corso di APPRENDIMENTO E APPROSSIMAZIONE Prof. Giancarlo Mauri Lezione 2 - Concept Learning

Outline Learning from examples General-to specific ordering of hypotheses Version spaces and candidate elimination algorithm Inductive bias

Concept learning Concept learning = inferring a boolean-valued function from training examples of its input and output

Training Examples for Concept Enjoy Sport Concept: ”days on which my friend Aldo enjoys his favourite water sports” Task: predict the value of ”Enjoy Sport” for an arbitrary day based on the values of the other attributes attributes Sky Temp Humid Wind Water Fore-cast Enjoy Sport Sunny Rainy Warm Cold Normal High Strong Cool Same Change Yes No instance

Representing Hypotheses 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 (null hypothesis): e.g. Water=Ø Example: hypothesis h Sky Temp Humid Wind Water Forecast < Sunny ? ? Strong ? Same >

Prototypical Concept Learning Task Given: Instances X : Possible days described by the attributes Sky, Temp, Humidity, Wind, Water, Forecast Target function c: EnjoySport X  {0,1} Hypotheses H: conjunction of literals e.g. < Sunny ? ? Strong ? Same > Training examples D : positive and negative examples of the target function: <x1,c(x1)>,…, <xn,c(xn)> Determine: A hypothesis h in H such that h(x)=c(x) for all x in D.

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.

Counting Instances, Concepts, Hypotheses Sky: Sunny, Cloudy, Rainy AirTemp: Warm, Cold Humidity: Normal, High Wind: Strong, Weak Water: Warm, Cold Forecast: Same, Change #distinct instances : 3*2*2*2*2*2 = 96 #distinct concepts : 296 #syntactically distinct hypotheses : 5*4*4*4*4*4=5120 #semantically distinct hypotheses : 1+4*3*3*3*3*3=973

General to Specific Ordering Consider two hypotheses: h1 = <Sunny, ?, ?, Strong, ?, ?> h2 = <Sunny, ?, ?, ?, ?, ?> Set of instances covered by h1 and h2: h2 imposes fewer constraints than h1 and therefore classifies more instances x as positive, i.e. h(x) = 1 Def. Let hj and hk be boolean-valued functions defined over X. Then hj is more general than or equal to hk (written hj  hk) if and only if x  X : [ (hk(x) = 1)  (hj(x) = 1)] The relation  imposes a partial order over the hypothesis space H that is utilized by many concept learning methods

General to Specific Ordering Instances x2 x1 Hypotheses h2 h3 h1 h2  h1 h2  h3 specific general x1=<Sunny, Warm, High, Strong, Cool, Same> h1=<Sunny, ?, ?, Strong, ?, ?> x2=<Sunny, Warm, High, Light, Warm, Same> h2=<Sunny, ?, ?, ?, ?, ?> h3=<Sunny, ?, ?, ?, Cool, ?>

Find-S Algorithm For each attribute constraint ai in h 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 ai in h is satisfied by x then do nothing else replace ai in h by the next more general constraint that is satisfied by x Output hypothesis h

Hypothesis Space Search by Find-S Instances Hypotheses h1 x1=<Sunny,Warm,Normal,Strong,Warm,Same>+ x1 h1=<Sunny,Warm,Normal, Strong,Warm,Same> specific x3=<Rainy,Cold,High,Strong,Warm,Change> - x3 h0 h0=<Ø, Ø, Ø, Ø, Ø, Ø,> h2,3 x2=<Sunny,Warm,High,Strong,Warm,Same>+ x2 h2,3=<Sunny,Warm,?, Strong,Warm,Same> h4 x4=<Sunny,Warm,High,Strong,Cool,Change> + x4 h4=<Sunny,Warm,?, Strong,?,?> general

Properties of Find-S Hypothesis space described by conjunctions of attributes Find-S will output the most specific hypothesis within H that is consistent with the positve training examples The output hypothesis will also be consistent with the negative examples, provided the target concept is contained in H.

Complaints about Find-S 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 Can’t tell when training data is inconsistent, as it ignores negative training examples Why prefer the most specific hypothesis? What if there are multiple maximally specific hypothesis?

Version Spaces A hypothesis h is consistent with a set of training examples D of target concept if and only if h(x)=c(x) for each training example <x,c(x)> in D. Consistent(h,D) := <x,c(x)>D h(x)=c(x) The version space, VSH,D , with respect to hypothesis space H, and training set D, is the subset of hypotheses from H consistent with all training examples: VSH,D = {h  H | Consistent(h,D) }

List-Then Eliminate Algorithm 1. VersionSpace  a list containing every hypothesis in H 2. For each training example <x, c(x)> remove from VersionSpace any hypothesis h that is inconsistent with the training example, i.e. h(x)  c(x) 3. Output the list of hypotheses in VersionSpace

Version Space: example {<Sunny,Warm,?,Strong,?,?>} <Sunny,?,?,Strong,?,?> <Sunny,Warm,?,?,?,?> <?,Warm,?,Strong,?,?> G: {<Sunny,?,?,?,?,?>, <?,Warm,?,?,?>, } x1 = <Sunny Warm Normal Strong Warm Same> + x2 = <Sunny Warm High Strong Warm Same> + x3 = <Rainy Cold High Strong Warm Change> - x4 = <Sunny Warm High Strong Cool Change> +

Representing Version Spaces The general boundary, G, of version space VSH,D is the set of maximally general members. The specific boundary, S, of version space VSH,D is the set of maximally specific members. Every member of the version space lies between these boundaries VSH,D = {h  H| ( s  S) ( g  G) (g  h  s) where x  y means x is more general or equal than y

Candidate Elimination Algorithm G  maximally general hypotheses in H S  maximally specific hypotheses in H For each training example d=<x,c(x)> If d is a positive example Remove from G any hypothesis that is inconsistent with d For each hypothesis s in S that is not consistent with d remove s from S. Add to S all minimal generalizations h of s such that h consistent with d Some member of G is more general than h Remove from S any hypothesis more general than another in S

Candidate Elimination Algorithm If d is a negative example Remove from S any hypothesis that is inconsistent with d For each hypothesis g in G that is not consistent with d remove g from G. Add to G all minimal specializations h of g such that h consistent with d Some member of S is more specific than h Remove from G any hypothesis less general than another in G

Candidate Elimination: example x1 = <Sunny Warm Normal Strong Warm Same> + {<, , , , ,  >} S: {<?, ?, ?, ?, ?, ?>} G: x2 = <Sunny Warm High Strong Warm Same> + {< Sunny Warm Normal Strong Warm Same >} S: {<?, ?, ?, ?, ?, ?>} G: {< Sunny Warm ? Strong Warm Same >} S: {<?, ?, ?, ?, ?, ?>} G:

Candidate Elimination: example S: {< Sunny Warm ? Strong Warm Same >} x3 = <Rainy Cold High Strong Warm Change> - G: {<?, ?, ?, ?, ?, ?>} x4 = <Sunny Warm High Strong Cool Change> + {< Sunny Warm ? Strong Warm Same >} S: {<Sunny,?,?,?,?,?>, <?,Warm,?,?,?>, <?,?,?,?,?,Same>} G: {< Sunny Warm ? Strong ? ? >} S: {<Sunny,?,?,?,?,?>, <?,Warm,?,?,?> } G:

Candidate Elimination: example Instance space: integer points in the x,y plane Hypothesis space: rectangles, that means hypotheses are of the form a ≤ x ≤ b , c ≤ y ≤ d.

Classification of New Data {<Sunny,Warm,?,Strong,?,?>} <Sunny,?,?,Strong,?,?> <Sunny,Warm,?,?,?,?> <?,Warm,?,Strong,?,?> G: {<Sunny,?,?,?,?,?>, <?,Warm,?,?,?>} x5 = <Sunny Warm Normal Strong Cool Change> 6/0 + x6 = <Rainy Cold Normal Light Warm Same> 0/6 - x7 = <Sunny Warm Normal Light Warm Same> 3/3 ? x8 = <Sunny Cold Normal Strong Warm Same> 2/4 ?

Inductive Leap S : <Sunny Warm Normal ? ? ?> + <Sunny Warm Normal Strong Cool Change> + <Sunny Warm Normal Light Warm Same> S : <Sunny Warm Normal ? ? ?> How can we justify to classify the new example as + <Sunny Warm Normal Strong Warm Same> Bias: We assume that the hypothesis space H contains the target concept c. In other words that c can be described by a conjunction of literals.

Biased Hypothesis Space Our hypothesis space is unable to represent a simple disjunctive target concept : (Sky=Sunny) v (Sky=Cloudy) x1 = <Sunny Warm Normal Strong Cool Change> + x2 = <Cloudy Warm Normal Strong Cool Change> + S : {<?, Warm, Normal, Strong, Cool, Change>} x3 = <Rainy Warm Normal Light Warm Same> - S : {}

Unbiased Learner Idea: Choose H that expresses every teachable concept, that means H is the set of all possible subsets of X called the power set P(X) |X|=96, |P(X)|=296 ~ 1028 distinct concepts H = disjunctions, conjunctions, negations e.g. <Sunny Warm Normal ? ? ?> v <? ? ? ? ? Change> H surely contains the target concept

Unbiased Learner What are S and G in this case? Assume positive examples (x1, x2, x3) and negative examples (x4, x5) S : {(x1 v x2 v x3)} G : { (x4 v x5)} The only examples that are classified are the training examples themselves. In other words in order to learn the target concept one would have to present every single instance in X as a training example. Each unobserved instance will be classified positive by precisely half the hypothesis in VS and negative by the other half.

Futility of Bias-Free Learning A learner that makes no prior assumptions regarding the identity of the target concept has no rational basis for classifying any unseen instances No Free Lunch!

(xi  X)[B  Dc  xi] |-- L(xi, Dc) 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 instance xi by L after training on Dc. Def. The inductive bias of L is any minimal set of assertions B such that for any target concept c and corresponding training data Dc (xi  X)[B  Dc  xi] |-- L(xi, Dc) where A |-- B means that A logically entails B.

Inductive Systems and Equivalent Deductive Systems training examples classification of new instance or don’t know candidate elimination algorithm using hypothesis space H new instance equivalent deductive system training examples classification of new instance or don’t know theorem prover new instance assertion ”H contains target concept”

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: The hypothesis space contains the target concept. Find-S Bias: The hypothesis space contains the target concept and all instances are negative instances unless the opposite is entailed by its other knowledge.