Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Friday, 25 January 2008 William.

Slides:



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

2. Concept Learning 2.1 Introduction
Università di Milano-Bicocca Laurea Magistrale in Informatica
Measuring Model Complexity (Textbook, Sections ) CS 410/510 Thurs. April 27, 2007 Given two hypotheses (models) that correctly classify the training.
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
Evaluating Hypotheses
Data Mining with Decision Trees Lutz Hamel Dept. of Computer Science and Statistics University of Rhode Island.
Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Evaluating Hypotheses.
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.
Machine Learning Chapter 3. Decision Tree Learning
CS 478 – Tools for Machine Learning and Data Mining The Need for and Role of Bias.
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.
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.
Learning from Observations Chapter 18 Through
 2003, G.Tecuci, Learning Agents Laboratory 1 Learning Agents Laboratory Computer Science Department George Mason University Prof. Gheorghe Tecuci 5.
Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Friday, 16 February 2007 William.
1 Concept Learning By Dong Xu State Key Lab of CAD&CG, ZJU.
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.
1 Machine Learning: Lecture 8 Computational Learning Theory (Based on Chapter 7 of Mitchell T.., Machine Learning, 1997)
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
For Monday No new reading Homework: –Chapter 18, exercises 3 and 4.
CS 8751 ML & KDDDecision Trees1 Decision tree representation ID3 learning algorithm Entropy, Information gain Overfitting.
Computing & Information Sciences Kansas State University Wednesday, 15 Nov 2006CIS 490 / 730: Artificial Intelligence Lecture 35 of 42 Wednesday, 15 November.
CS 5751 Machine Learning Chapter 3 Decision Tree Learning1 Decision Trees Decision tree representation ID3 learning algorithm Entropy, Information gain.
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
Machine Learning Tom M. Mitchell Machine Learning Department Carnegie Mellon University Today: Computational Learning Theory Probably Approximately.
Data Mining and Decision Support
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.
MACHINE LEARNING 3. Supervised Learning. Learning a Class from Examples Based on E Alpaydın 2004 Introduction to Machine Learning © The MIT Press (V1.1)
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 Lecture 1: Intro + Decision Trees Moshe Koppel Slides adapted from Tom Mitchell and from Dan Roth.
Machine Learning Chapter 7. Computational Learning Theory Tom M. Mitchell.
CS-424 Gregory Dudek Lecture 14 Learning –Inductive inference –Probably approximately correct learning.
Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Thursday, 25 January 2007 William.
1 CS 391L: Machine Learning: Computational Learning Theory Raymond J. Mooney University of Texas at Austin.
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 3. Decision Tree Learning
Computational Learning Theory
Machine Learning: Lecture 3
Computational Learning Theory
Machine Learning Chapter 3. Decision Tree Learning
Concept Learning.
Concept Learning Berlin Chen 2005 References:
Lecture 14 Learning Inductive inference
Machine Learning Chapter 2
Version Space Machine Learning Fall 2018.
Machine Learning Chapter 2
Presentation transcript:

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Friday, 25 January 2008 William H. Hsu Department of Computing and Information Sciences, KSU Readings: Chapter 2, Mitchell Section 5.1.2, Buchanan and Wilkins Representation Bias vs. Search Bias and Intro to Decision Trees Lecture 02 of 42

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Lecture Outline Read: Chapter 2, Mitchell; Section 5.1.2, Buchanan and Wilkins Suggested Exercises: 2.2, 2.3, 2.4, 2.6 Taxonomy of Learning Systems Learning from Examples –(Supervised) concept learning framework –Simple approach: assumes no noise; illustrates key concepts General-to-Specific Ordering over Hypotheses –Version space: partially-ordered set (poset) formalism –Candidate elimination algorithm –Inductive learning Choosing New Examples Next Week –The need for inductive bias: 2.7, Mitchell; , Shavlik and Dietterich –Computational learning theory (COLT): Chapter 7, Mitchell –PAC learning formalism: , Mitchell; 2.4.2, Shavlik and Dietterich

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition d 1 : d 2 : d 3 : d 4 : = G 2 S0S0 G0G0 = S 3 = G 1 G4G4 S4S4 S1S1 G3G3 S2S2 Review: Example Trace

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Active Learning: What Query Should The Learner Make Next? How Should These Be Classified?  S: G: Review: What Next Training Example?

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition What Justifies This Inductive Leap? Example: Inductive Generalization –Positive example: –Induced S: Why Believe We Can Classify The Unseen? –e.g., –When is there enough information (in a new case) to make a prediction?

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Interesting Applications Reasoning (Inference, Decision Support) Cartia ThemeScapes news stories from the WWW in 1997 Planning, Control Normal Ignited Engulfed Destroyed Extinguished Fire Alarm Flooding DC-ARM - Database Mining NCSA D2K -

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition An Unbiased Learner Example of A Biased H –Conjunctive concepts with don’t cares –What concepts can H not express? (Hint: what are its syntactic limitations?) Idea –Choose H’ that expresses every teachable concept –i.e., H’ is the power set of X –Recall: | A  B | = | B | | A | ( A = X; B = {labels}; H’ = A  B ) –{{Rainy, Sunny}  {Warm, Cold}  {Normal, High}  {None, Mild, Strong}  {Cool, Warm}  {Same, Change}}  {0, 1} An Exhaustive Hypothesis Language –Consider: H’ = disjunctions (  ), conjunctions (  ), negations (¬) over previous H –| H’ | = 2 ( ) = 2 96 ; | H | = 1 + ( ) = 973 What Are S, G For The Hypothesis Language H’? –S  disjunction of all positive examples –G  conjunction of all negated negative examples

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Inductive Bias Components of An Inductive Bias Definition –Concept learning algorithm L –Instances X, target concept c –Training examples D c = { } –L(x i, D c ) = classification assigned to instance x i by L after training on D c Definition –The inductive bias of L is any minimal set of assertions B such that, for any target concept c and corresponding training examples D c,  x i  X. [(B  D c  x i ) |  L(x i, D c )] where A |  B means A logically entails B –Informal idea: preference for (i.e., restriction to) certain hypotheses by structural (syntactic) means Rationale –Prior assumptions regarding target concept –Basis for inductive generalization

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Inductive Systems and Equivalent Deductive Systems Candidate Elimination Algorithm Using Hypothesis Space H Inductive System Theorem Prover Equivalent Deductive System Training Examples New Instance Training Examples New Instance Assertion { c  H } Inductive bias made explicit Classification of New Instance (or “Don’t Know”) Classification of New Instance (or “Don’t Know”)

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Three Learners with Different Biases Rote Learner –Weakest bias: anything seen before, i.e., no bias –Store examples –Classify x if and only if it matches previously observed example Version Space Candidate Elimination Algorithm –Stronger bias: concepts belonging to conjunctive H –Store extremal generalizations and specializations –Classify x if and only if it “falls within” S and G boundaries (all members agree) Find-S –Even stronger bias: most specific hypothesis –Prior assumption: any instance not observed to be positive is negative –Classify x based on S set

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Views of Learning Removal of (Remaining) Uncertainty –Suppose unknown function was known to be m-of-n Boolean function –Could use training data to infer the function Learning and Hypothesis Languages –Possible approach to guess a good, small hypothesis language: Start with a very small language Enlarge until it contains a hypothesis that fits the data –Inductive bias Preference for certain languages Analogous to data compression (removal of redundancy) Later: coding the “model” versus coding the “uncertainty” (error) We Could Be Wrong! –Prior knowledge could be wrong (e.g., y = x 4  one-of (x 1, x 3 ) also consistent) –If guessed language was wrong, errors will occur on new cases

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Two Strategies for Machine Learning Develop Ways to Express Prior Knowledge –Role of prior knowledge: guides search for hypotheses / hypothesis languages –Expression languages for prior knowledge Rule grammars; stochastic models; etc. Restrictions on computational models; other (formal) specification methods Develop Flexible Hypothesis Spaces –Structured collections of hypotheses Agglomeration: nested collections (hierarchies) Partitioning: decision trees, lists, rules Neural networks; cases, etc. –Hypothesis spaces of adaptive size Either Case: Develop Algorithms for Finding A Hypothesis That Fits Well –Ideally, will generalize well Later: Bias Optimization (Meta-Learning, Wrappers)

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Computational Learning Theory What General Laws Constrain Inductive Learning? What Learning Problems Can Be Solved? When Can We Trust The Output of A Learning Algorithm? We Seek Theory To Relate: –Probability of successful learning –Number of training examples –Complexity of hypothesis space –Accuracy to which target concept is approximated –Manner in which training examples are presented

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Prototypical Concept Learning Task Given –Instances X: possible days, each described by attributes Sky, AirTemp, Humidity, Wind, Water, Forecast –Target function c  EnjoySport: X  H –Hypotheses H: conjunctions of literals, e.g., –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? –A hypothesis h in H such that h(x) = c(x) for all x in X?

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Sample Complexity How Many Training Examples Sufficient To Learn Target Concept? Scenario 1: Active Learning –Learner proposes instances, as queries to teacher –Query (learner): instance x –Answer (teacher): c(x) Scenario 2: Passive Learning from Teacher-Selected Examples –Teacher (who knows c) provides training examples –Sequence of examples (teacher): { } –Teacher may or may not be helpful, optimal Scenario 3: Passive Learning from Teacher-Annotated Examples –Random process (e.g., nature) proposes instances –Instance x generated randomly, teacher provides c(x)

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Sample Complexity: Scenario 1 Learner Proposes Instance x Teacher Provides c(x) –Comprehensibility: assume c is in learner’s hypothesis space H –A form of inductive bias (sometimes nontrivial!) Optimal Query Strategy: Play 20 Questions –Pick instance x such that half of hypotheses in VS classify x positive, half classify x negative –When this is possible, need queries to learn c –When not possible, need even more

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Sample Complexity: Scenario 2 Teacher Provides Training Examples –Teacher: agent who knows c –Assume c is in learner’s hypothesis space H (as in Scenario 1) Optimal Teaching Strategy: Depends upon H Used by Learner –Consider case: H = conjunctions of up to n boolean literals and their negations –e.g., (AirTemp = Warm)  (Wind = Strong), where AirTemp, Wind, … each have 2 possible values –Complexity If n possible boolean attributes in H, n + 1 examples suffice Why?

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Sample Complexity: Scenario 3 Given –Set of instances X –Set of hypotheses H –Set of possible target concepts C –Training instances generated by a fixed, unknown probability distribution D over X Learner Observes Sequence D –D: training examples of form for target concept c  C –Instances x are drawn from distribution D –Teacher provides target value c(x) for each Learner Must Output Hypothesis h Estimating c –h evaluated on performance on subsequent instances –Instances still drawn according to D Note: Probabilistic Instances, Noise-Free Classifications

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition True Error of A Hypothesis Definition –The true error (denoted error D (h)) of hypothesis h with respect to target concept c and distribution D is the probability that h will misclassify an instance drawn at random according to D. – Two Notions of Error –Training error of hypothesis h with respect to target concept c: how often h(x)  c(x) over training instances –True error of hypothesis h with respect to target concept c: how often h(x)  c(x) over future random instances Our Concern –Can we bound true error of h (given training error of h)? –First consider when training error of h is zero (i.e, h  VS H,D ) c h Instance Space X Where c and h disagree

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Exhausting The Version Space Definition –The version space VS H,D is said to be  -exhausted with respect to c and D, if every hypothesis h in VS H,D has error less than  with respect to c and D. –  h  VS H,D. error D (h) <  Hypothesis Space H error = 0.1 r = 0.2 error = 0.3 r = 0.1 error = 0.2 r = 0.0 error = 0.1 r = 0.0 VS H,D error = 0.3 r = 0.4 error = 0.2 r = 0.3 (r = training error, error = true error)

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition An Unbiased Learner Example of A Biased H –Conjunctive concepts with don’t cares –What concepts can H not express? (Hint: what are its syntactic limitations?) Idea –Choose H’ that expresses every teachable concept –i.e., H’ is the power set of X –Recall: | A  B | = | B | | A | ( A = X; B = {labels}; H’ = A  B ) –{{Rainy, Sunny}  {Warm, Cold}  {Normal, High}  {None, Mild, Strong}  {Cool, Warm}  {Same, Change}}  {0, 1} An Exhaustive Hypothesis Language –Consider: H’ = disjunctions (  ), conjunctions (  ), negations (¬) over previous H –| H’ | = 2 ( ) = 2 96 ; | H | = 1 + ( ) = 973 What Are S, G For The Hypothesis Language H’? –S  disjunction of all positive examples –G  conjunction of all negated negative examples

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Inductive Bias Components of An Inductive Bias Definition –Concept learning algorithm L –Instances X, target concept c –Training examples D c = { } –L(x i, D c ) = classification assigned to instance x i by L after training on D c Definition –The inductive bias of L is any minimal set of assertions B such that, for any target concept c and corresponding training examples D c,  x i  X. [(B  D c  x i ) |  L(x i, D c )] where A |  B means A logically entails B –Informal idea: preference for (i.e., restriction to) certain hypotheses by structural (syntactic) means Rationale –Prior assumptions regarding target concept –Basis for inductive generalization

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Inductive Systems and Equivalent Deductive Systems Candidate Elimination Algorithm Using Hypothesis Space H Inductive System Theorem Prover Equivalent Deductive System Training Examples New Instance Training Examples New Instance Assertion { c  H } Inductive bias made explicit Classification of New Instance (or “Don’t Know”) Classification of New Instance (or “Don’t Know”)

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Three Learners with Different Biases Rote Learner –Weakest bias: anything seen before, i.e., no bias –Store examples –Classify x if and only if it matches previously observed example Version Space Candidate Elimination Algorithm –Stronger bias: concepts belonging to conjunctive H –Store extremal generalizations and specializations –Classify x if and only if it “falls within” S and G boundaries (all members agree) Find-S –Even stronger bias: most specific hypothesis –Prior assumption: any instance not observed to be positive is negative –Classify x based on S set

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Number of Examples Required to Exhaust The Version Space How Many Examples Will  –Exhaust The Version Space? Theorem [Haussler, 1988] –If the hypothesis space H is finite, and D is a sequence of m  1 independent random examples of some target concept c, then for any 0    1, the probability that the version space with respect to H and D is not  -exhausted (with respect to c) is less than or equal to | H | e -  m Important Result! –Bounds the probability that any consistent learner will output a hypothesis h with error(h)   –Want this probability to be below a specified threshold  | H | e -  m   –To achieve, solve inequality for m: let m  1/  (ln |H| + ln (1/  )) –Need to see at least this many examples

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Learning Conjunctions of Boolean Literals How Many Examples Are Sufficient? –Specification - ensure that with probability at least (1 -  ): Every h in VS H,D satisfies error D (h) <  –“The probability of an  -bad hypothesis (error D (h)   ) is no more than  ” –Use our theorem: m  1/  (ln |H| + ln (1/  )) –H: conjunctions of constraints on up to n boolean attributes (n boolean literals) –| H | = 3 n, m  1/  (ln 3 n + ln (1/  )) = 1/  (n ln 3 + ln (1/  )) How About EnjoySport? –H as given in EnjoySport (conjunctive concepts with don’t cares) | H | = 973 m  1/  (ln |H| + ln (1/  )) –Example goal: probability 1 -  = 95% of hypotheses with error D (h) < 0.1 –m  1/0.1 (ln ln (1/0.05))  98.8

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition PAC Learning Terms Considered –Class C of possible concepts –Set of instances X –Length n (in attributes) of each instance –Learner L –Hypothesis space H –Error parameter (error bound)  –Confidence parameter (excess error probability bound)  –size(c) = the encoding length of c, assuming some representation Definition –C is PAC-learnable by L using H if for all c  C, distributions D over X,  such that 0 <  < 1/2, and  such that 0 <  < 1/2, learner L will, with probability at least (1 -  ), output a hypothesis h  H such that error D (h)   –C is efficiently PAC-learnable if L runs in time polynomial in 1/ , 1/ , n, size(c)

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition When to Consider Using Decision Trees Instances Describable by Attribute-Value Pairs Target Function Is Discrete Valued Disjunctive Hypothesis May Be Required Possibly Noisy Training Data Examples –Equipment or medical diagnosis –Risk analysis Credit, loans Insurance Consumer fraud Employee fraud –Modeling calendar scheduling preferences (predicting quality of candidate time)

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Decision Trees and Decision Boundaries Instances Usually Represented Using Discrete Valued Attributes –Typical types Nominal ({red, yellow, green}) Quantized ({low, medium, high}) –Handling numerical values Discretization, a form of vector quantization (e.g., histogramming) Using thresholds for splitting nodes Example: Dividing Instance Space into Axis-Parallel Rectangles y > 7? NoYes x < 3? NoYes y < 5? NoYes x < 1? NoYes y x

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition [21+, 5-][8+, 30-] Decision Tree Learning: Top-Down Induction (ID3) A1A1 TrueFalse [29+, 35-] [18+, 33-][11+, 2-] A2A2 TrueFalse [29+, 35-] Algorithm Build-DT (Examples, Attributes) IF all examples have the same label THEN RETURN (leaf node with label) ELSE IF set of attributes is empty THEN RETURN (leaf with majority label) ELSE Choose best attribute A as root FOR each value v of A Create a branch out of the root for the condition A = v IF {x  Examples: x.A = v} = Ø THEN RETURN (leaf with majority label) ELSE Build-DT ({x  Examples: x.A = v}, Attributes ~ {A}) But Which Attribute Is Best?

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Terminology Inductive Bias –Strength of inductive bias: how few hypotheses? –Specific biases: based on specific languages Hypothesis Language –“Searchable subset” of the space of possible descriptors –m-of-n, conjunctive, disjunctive, clauses –Ability to represent a concept PAC Learning –Probably Approximately Correct –Computational Learning Theory (COLT) –True error versus training error –Notation: distribution D, error D (h),  -bad with probability  –  -exhaustion: every hypothesis in VS H,D has error D (h) <  –PAC-learnability: for c  C, X, n, L, H, , 

Kansas State University Department of Computing and Information Sciences CIS 732: Machine Learning and Pattern Recognition Summary Points Inductive Leaps Possible Only if Learner Is Biased –Futility of learning without bias –Strength of inductive bias: proportional to restrictions on hypotheses Modeling Inductive Learners with Equivalent Deductive Systems –Representing inductive learning as theorem proving –Equivalent learning and inference problems Syntactic Restrictions –Example: m-of-n concept Views of Learning and Strategies –Removing uncertainty (“data compression”) –Role of knowledge Introduction to Computational Learning Theory (COLT) –Things COLT attempts to measure –Probably-Approximately-Correct (PAC) learning framework Next Lecture: Occam’s Razor, VC Dimension, and Error Bounds