Decision Tree Learning

Size: px
Start display at page:

Download "Decision Tree Learning"

Transcription

1 Topics Decision Tree Learning Sattiraju Prabhakar CS898O: DTL Wichita State University What are decision trees? How do we use them? New Learning Task ID3 Algorithm Weka Demo C4.5 Algorithm Weka Demo Implementation 9/14/2004 ML2004_DecisionTreeLearning 2 What are Decision Trees? Elements of Decision Tree Attribute value Attribute Yes Yes No 9/14/2004 ML2004_DecisionTreeLearning 3 9/14/2004 ML2004_DecisionTreeLearning 4 1

2 Example: PlayTennis Example Decision Tree 9/14/2004 ML2004_DecisionTreeLearning 5 9/14/2004 ML2004_DecisionTreeLearning 6 Example: Contact Lens data Example: Labour Negotiations (a) (b) 9/14/2004 ML2004_DecisionTreeLearning 7 9/14/2004 ML2004_DecisionTreeLearning 8 2

3 Exercise: Animal Decision tree for a simple disjunction. Example Vertibral Column Make_So und Legs Take_Food Animal Man Yes Talking 2 Cultivation Yes Mango Tree No Branch Moveme nt 1 Using_ Chlorophyll No Lizard Yes Using 4 Catches Yes Tongue Flies Parameciu m No No Sound 0 Absorbs Cells Yes Flytrap No No Sound 0 Catches Flies No 9/14/2004 ML2004_DecisionTreeLearning 9 9/14/2004 ML2004_DecisionTreeLearning 10 Structure of a Decision Tree New Learning Task Structure: Is a disjunction of conjunctions on the attribute values of instances Each path from tree root to a leaf corresponds to a conjunction of attribute tests Tree itself is a disjunction of thee conjunctions Example: PlayTennis Decision Tree (Outlook=Sunny Humidity=Normal) (Outlook = Overcast) (Outlook = Rain Wind = Weak) 9/14/2004 ML2004_DecisionTreeLearning 11 9/14/2004 ML2004_DecisionTreeLearning 12 3

4 Learner + Performance Element Using Decision Tree by Performance Element Training Examples Test Examples Learner Learnt Model: Decision Tree Performance Element Yes/ No Decision New Situation or example Decision Tree Classifier Yes/ No Decision 9/14/2004 ML2004_DecisionTreeLearning 13 9/14/2004 ML2004_DecisionTreeLearning 14 Characterizing Learning Task Strengths of DTL It should be possible to represent instances by attribute-value pairs Target Function should have discrete values It should be possible to represent Target Functions as disjunctive expressions Training data may contain errors Even when some attribute value pairs are missing in instance descriptions, we can use them 9/14/2004 ML2004_DecisionTreeLearning 15 9/14/2004 ML2004_DecisionTreeLearning 16 4

5 Decision Tree Learning Algorithm Decision Tree Learning Algorithm Topics: Different ways of partitioning instance space Entropy and Information Gain ID3 algorithm Topics: Different ways of partitioning instance space Entropy and Information Gain ID3 algorithm 9/14/2004 ML2004_DecisionTreeLearning 17 9/14/2004 ML2004_DecisionTreeLearning 18 Different ways of partitioning the instance space. Decision Tree stumps for the weather data. (a) (b) (a) (b) (c) (d) (c) (d) 9/14/2004 ML2004_DecisionTreeLearning 19 9/14/2004 ML2004_DecisionTreeLearning 20 5

6 Expanded tree stumps for the weather data. Decision tree for the weather data. (a) (b) (c) 9/14/2004 ML2004_DecisionTreeLearning 21 9/14/2004 ML2004_DecisionTreeLearning 22 Operation of a covering algorithm; decision tree for the same problem Example of building a partial tree. y b a b b b a b b a a a b b b a b b b b b y b a b b a b b b a a a b b b a b b b b b y 2 6 b a b b b a b b a a a b b b a b b b b b (a) (c) x 1 2 x 1 2 x (a) (b) (b) 9/14/2004 ML2004_DecisionTreeLearning 23 9/14/2004 ML2004_DecisionTreeLearning 24 6

7 Decision Tree Learning Algorithm Attribute Selection Topics: Different ways of partitioning instance space Attribute Selection: Entropy and Information Gain ID3 algorithm To build a decision tree, we need to select an attribute Selection of different attributes at different points lead to different decision trees Two measures are important for selection of attributes: Entropy Information Gain 9/14/2004 ML2004_DecisionTreeLearning 25 9/14/2004 ML2004_DecisionTreeLearning 26 Entropy Definition (1) Entropy Definition (2) Definition: It is a measure of (im)purity of a collection of examples. Formalization of Measure: Let S is a collection of instances Let a Target Concept, T divides the S into positive and negative examples Then entropy if S with respect to T is: In the entropy formula: p is the portion of positive examples in S p Θ is the portion of negative examples in S We define 0 log 2 0 to be 0 Entropy(S, T) -p log 2 p - p Θ log 2 p Θ 9/14/2004 ML2004_DecisionTreeLearning 27 9/14/2004 ML2004_DecisionTreeLearning 28 7

8 Example of Entropy S is a set of 14 examples +ve = 9 -ve = 5 Case1: Pure Samples: Entropy[14+, 0] = -1 log = 0 Entropy[0, 14-] = -0 (14/ 14) log 2 1 = 0 Case2: Most Impure Samples: Entropy[7, 7] = -(7/14)log 2 (7/14) (7/14)log 2 (7/14) = 1 Case3: Other samples: Entropy [9+, 5-] = - (9/14) log 2 (9/14) (5/14) log 2 (5/14) = CONCLUSION: Entropy is larger for larger impurity Entropy: Variation with Positive Example Ratio 9/14/2004 ML2004_DecisionTreeLearning 29 9/14/2004 ML2004_DecisionTreeLearning 30 Interpretation of Entropy (1) Interpretation of Entropy (2) Interpretation: Given an instance from S What is the (additional) information needed to tell the classification of that instance If p is 1, Let us say we arbitrarily choose an example No additional information is needed to classify it That is, it can be perfectly be classified Then entropy of that S is 0 If p is 0.5: Then S has equal number of + ve and -ve examples For any example picked up arbitrarily from S We cannot say it is positive or negative for sure To say the given example is positive or negative, we need to see S where all examples are all either positive or negative If p is 0.8: Then we may not be able to correctly classify an instance But we know the instance is more likely to be positive than negative At this point, we need less (additional) information to show the instance is positive We need more (additional) information to show that the instance is negative 9/14/2004 ML2004_DecisionTreeLearning 31 9/14/2004 ML2004_DecisionTreeLearning 32 8

9 Generalizing Entropy Criterion for Attribute Selection Entropy( S) = pilog pi c i= 1 c = number of values an attribute can take 2 9/14/2004 ML2004_DecisionTreeLearning 33 9/14/2004 ML2004_DecisionTreeLearning 34 Information as measure of purity of a subset Expected Amount of Information Information: Represents the expected amount of information needed to classify a new instance as yes or no. Examples of information: Gain([2,3])=0.971bits Gain([4,0])=0.0bits Gain([3,2])=0.971bits Expected Amount of Information required to classify a new instance correctly at this node is: The average value taking all the branches into account: Gain([2,3], [4,0], [3,2])=(5/15) x Gain([2,3]) + (4/14) x Gain([4,0]) + (5/14) x Gain([3,2]) Gain([2,3], [4,0], [3,2]) = (5/14) x (4/14) x 0 + (5/14) x = bits This is the amount of information required to specify the class of a new instance. 9/14/2004 ML2004_DecisionTreeLearning 35 9/14/2004 ML2004_DecisionTreeLearning 36 9

10 Gain as Expected Reduction in Entropy Attribute Selection based on Gain Gain is the Expected reduction in entropy caused by partitioning the examples according to this attribute G(S, A) = Entropy(S) Expected_Entropy (S, A) Expected_Entropy(S, A) =? vvaluesa ( ) Sv EntropyS ( v) S Larger the Gain, better it is for classification In the following example, Humidity is a better classifier than Wind Reason: Better Gain implies, reduction in Entropy as one goes down the tree Smaller Entropy means less information required to correctly classify an instance 9/14/2004 ML2004_DecisionTreeLearning 37 9/14/2004 ML2004_DecisionTreeLearning 38 Which attribute is best for classifier? Decision Tree Learning Algorithm Topics: Different ways of partitioning instance space Entropy and Information Gain ID3 algorithm 9/14/2004 ML2004_DecisionTreeLearning 39 9/14/2004 ML2004_DecisionTreeLearning 40 10

11 The Problem in Learning Decision Tree To find the simplest hypothesis To derive a decision tree that classifies all examples correctly. To be able to describe a large number of examples in a concise way Ockham s Razor: The most likely hypothesis is the simplest one that is consistent with all observations (examples). Simplest hypotheses have simple structure Decision tree with smallest number of levels Simplest hypothesis has the smallest decision tree In general, finding the smallest decision tree is an intractable problem. We use heuristics To test the most important attribute first. The most important attribute is the one that classifies all examples significantly. 9/14/2004 ML2004_DecisionTreeLearning 41 9/14/2004 ML2004_DecisionTreeLearning 42 Algorithm: Behavior Partially Learnt Decision Tree Step1: Root node is created Which attribute to be tested first in the tree? ID3 determines the information gain for each candidate attribute Select the one with the highest information gain Gain(S, Outlook) = Gain(S, Humidity) = Gain(S, Wind) = Gain(S, Temperature) = /14/2004 ML2004_DecisionTreeLearning 43 9/14/2004 ML2004_DecisionTreeLearning 44 11

12 ID3 Functional Algorithm Functional Algorithm If positive and negative examples present Choose best attribute to split them If all remaining examples are positive (or negative) Say yes (or no ) If no examples left Return default value (majority classification) If no attributes left, but there are unclassified examples There is noise in the data 9/14/2004 ML2004_DecisionTreeLearning 45 9/14/2004 ML2004_DecisionTreeLearning 46 ID3 Algorithm Part I ID3 Algorithm Part II ID3(Examples, Target_attribute, Attributes) Create a Root node for the tree If Examples all positive? Return Single Node Tree Root, with label = + If Examples all negative? Return Single node Tree Root, with label = - If Attributes is empty Return single-node tree Root, label = most common value of Target_attribute in Examples Otherwise A Best_Attribute (Attributes, Examples ) Root A For each value v i of A Add a new tree branch Examples_svi is a subset of Examples for vi If Examples_svi is empty? Add leaf node label = most common value of Target_attribute Add a new sub tree: ID3(Examples_svi, Target_attribute, Attributes {A}) 9/14/2004 ML2004_DecisionTreeLearning 47 9/14/2004 ML2004_DecisionTreeLearning 48 12

13 Computing Information Gain Continuing to Split 9/14/2004 ML2004_DecisionTreeLearning 49 9/14/2004 ML2004_DecisionTreeLearning 50 Final Decision Tree Analysis 9/14/2004 ML2004_DecisionTreeLearning 51 9/14/2004 ML2004_DecisionTreeLearning 52 13

14 DTL as Search DTL as Search Main Issue: Select best attribute that classifies examples Each possible attribute points to a search state Search: Top_Down: Start with a concept that represents all examples Greedy Search: Select attribute that classifies maximum number of examples Algorithm never backtracks to reconsider earlier choices Systems ID3 and C4.5 9/14/2004 ML2004_DecisionTreeLearning 53 9/14/2004 ML2004_DecisionTreeLearning 54 Exercise Learn the Cell concept from the examples Try various best attributes Properties of ID3: Hypothesis Space What is a hypothesis in DTL? Each hypothesis is the disjunction of a set of paths starting from an attribute What is a hypothesis space in DTL? It is all the possible trees that are considered by ID3 algorithm How does the ID3 consider different possible hypotheses? Comparing attributes, from a set of attributes, in order to add to a node. 9/14/2004 ML2004_DecisionTreeLearning 55 9/14/2004 ML2004_DecisionTreeLearning 56 14

15 Search in Hypothesis Space Properties of Hypothesis Space Search (1) How do we characterize the search in ID3? Simple-to-complex, hill-climbing search through hypothesis space Evaluation function for hill-climbing: Information gain Decision Trees are completely expressive They can express all possible hypotheses The search is in this complete space If the target function is in the hypothesis space, ID3 will find it Search Strategy is incomplete Searches from simple to complex hypotheses using hill climbing until termination condition is reached It maintains a single current hypothesis 9/14/2004 ML2004_DecisionTreeLearning 57 9/14/2004 ML2004_DecisionTreeLearning 58 Properties of Hypothesis Space Search (2) Performance Measurement May not find globally optimal solution Performs no backtracking Uses all training examples at each step of its search 9/14/2004 ML2004_DecisionTreeLearning 59 9/14/2004 ML2004_DecisionTreeLearning 60 15

16 Performance Measurement C4.5 9/14/2004 ML2004_DecisionTreeLearning 61 9/14/2004 ML2004_DecisionTreeLearning 62 Curve Fitting: Inductive Learning Method Inductive Learning Method 9/14/2004 ML2004_DecisionTreeLearning 63 9/14/2004 ML2004_DecisionTreeLearning 64 16

17 Inductive Learning Method Inductive Learning Method 9/14/2004 ML2004_DecisionTreeLearning 65 9/14/2004 ML2004_DecisionTreeLearning 66 Inductive Learning Method Inductive Learning Method 9/14/2004 ML2004_DecisionTreeLearning 67 9/14/2004 ML2004_DecisionTreeLearning 68 17

18 Overfitting Overfitting Definition: Given a hypothesis space H, a hypothesis h H is said to overfit the training data if there exists some alternative hypothesis h H, such that h has smaller error than h over the training examples, but h has a smaller error than h over the entire distribution of instances. See figure 3.6 in book Illustrates how the overfit hypothesis loses accuracy over test data How overfit hypotheses are generated? If training examples have errors Error Example: <Outlook = Sunny, Temperature = Hot, Humidity = Normal, Wind = Strong, PlayTennis = No> Because of this, ID3 will construct a complex decision tree (h) that is more complex than the decision tree(h ) The more complexh fits the training examples, better than h The simpler h fits the test examples better than h 9/14/2004 ML2004_DecisionTreeLearning 69 9/14/2004 ML2004_DecisionTreeLearning 70 How to avoid Overfitting? Subtree Replacement Post-prune the decision tree Generate the decision tree that overfits the data using all the training examples Prune out the subtrees from this tree Use a separate set of examples (Validation set) to evaluate the utility of post-pruning nodes from tree Subtree replacement: Replace subtrees by leaves Starts from the leaves and works back up toward the root Example: The left branch of left tree is replaced by the right tree To decide whether to replace a subtree by a leaf The error rate is estimated 9/14/2004 ML2004_DecisionTreeLearning 71 9/14/2004 ML2004_DecisionTreeLearning 72 18

19 Implementation of ID3 ARFF file for the weather data. % ARFF file for the weather data with some numeric features outlook { sunny, overcast, rainy temperature humidity windy { true, false play? { yes, no % % 14 instances % sunny, 85, 85, false, no sunny, 80, 90, true, no overcast, 83, 86, false, yes rainy, 70, 96, false, yes rainy, 68, 80, false, yes rainy, 65, 70, true, no overcast, 64, 65, true, yes sunny, 72, 95, false, no sunny, 69, 70, false, yes rainy, 75, 80, false, yes sunny, 75, 70, true, yes overcast, 72, 90, true, yes overcast, 81, 75, false, yes rainy, 71, 91, true, no 9/14/2004 ML2004_DecisionTreeLearning 73 9/14/2004 ML2004_DecisionTreeLearning 74 19

Decision Tree Learning

Decision Tree Learning Topics Decision Tree Learning Sattiraju Prabhakar CS898O: DTL Wichita State University What are decision trees? How do we use them? New Learning Task ID3 Algorithm Weka Demo C4.5 Algorithm Weka Demo Implementation

More information

Introduction. Decision Tree Learning. Outline. Decision Tree 9/7/2017. Decision Tree Definition

Introduction. Decision Tree Learning. Outline. Decision Tree 9/7/2017. Decision Tree Definition Introduction Decision Tree Learning Practical methods for inductive inference Approximating discrete-valued functions Robust to noisy data and capable of learning disjunctive expression ID3 earch a completely

More information

Decision Tree Learning and Inductive Inference

Decision Tree Learning and Inductive Inference Decision Tree Learning and Inductive Inference 1 Widely used method for inductive inference Inductive Inference Hypothesis: Any hypothesis found to approximate the target function well over a sufficiently

More information

Learning Classification Trees. Sargur Srihari

Learning Classification Trees. Sargur Srihari Learning Classification Trees Sargur srihari@cedar.buffalo.edu 1 Topics in CART CART as an adaptive basis function model Classification and Regression Tree Basics Growing a Tree 2 A Classification Tree

More information

Lecture 3: Decision Trees

Lecture 3: Decision Trees Lecture 3: Decision Trees Cognitive Systems II - Machine Learning SS 2005 Part I: Basic Approaches of Concept Learning ID3, Information Gain, Overfitting, Pruning Lecture 3: Decision Trees p. Decision

More information

Decision Tree Learning Mitchell, Chapter 3. CptS 570 Machine Learning School of EECS Washington State University

Decision Tree Learning Mitchell, Chapter 3. CptS 570 Machine Learning School of EECS Washington State University Decision Tree Learning Mitchell, Chapter 3 CptS 570 Machine Learning School of EECS Washington State University Outline Decision tree representation ID3 learning algorithm Entropy and information gain

More information

Decision Tree Learning

Decision Tree Learning Decision Tree Learning Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University References: 1. Machine Learning, Chapter 3 2. Data Mining: Concepts, Models,

More information

Lecture 3: Decision Trees

Lecture 3: Decision Trees Lecture 3: Decision Trees Cognitive Systems - Machine Learning Part I: Basic Approaches of Concept Learning ID3, Information Gain, Overfitting, Pruning last change November 26, 2014 Ute Schmid (CogSys,

More information

Learning Decision Trees

Learning Decision Trees Learning Decision Trees Machine Learning Fall 2018 Some slides from Tom Mitchell, Dan Roth and others 1 Key issues in machine learning Modeling How to formulate your problem as a machine learning problem?

More information

Learning Decision Trees

Learning Decision Trees Learning Decision Trees Machine Learning Spring 2018 1 This lecture: Learning Decision Trees 1. Representation: What are decision trees? 2. Algorithm: Learning decision trees The ID3 algorithm: A greedy

More information

Decision Trees / NLP Introduction

Decision Trees / NLP Introduction Decision Trees / NLP Introduction Dr. Kevin Koidl School of Computer Science and Statistic Trinity College Dublin ADAPT Research Centre The ADAPT Centre is funded under the SFI Research Centres Programme

More information

EECS 349:Machine Learning Bryan Pardo

EECS 349:Machine Learning Bryan Pardo EECS 349:Machine Learning Bryan Pardo Topic 2: Decision Trees (Includes content provided by: Russel & Norvig, D. Downie, P. Domingos) 1 General Learning Task There is a set of possible examples Each example

More information

Decision Trees. Tirgul 5

Decision Trees. Tirgul 5 Decision Trees Tirgul 5 Using Decision Trees It could be difficult to decide which pet is right for you. We ll find a nice algorithm to help us decide what to choose without having to think about it. 2

More information

Classification and Regression Trees

Classification and Regression Trees Classification and Regression Trees Ryan P Adams So far, we have primarily examined linear classifiers and regressors, and considered several different ways to train them When we ve found the linearity

More information

Decision-Tree Learning. Chapter 3: Decision Tree Learning. Classification Learning. Decision Tree for PlayTennis

Decision-Tree Learning. Chapter 3: Decision Tree Learning. Classification Learning. Decision Tree for PlayTennis Decision-Tree Learning Chapter 3: Decision Tree Learning CS 536: Machine Learning Littman (Wu, TA) [read Chapter 3] [some of Chapter 2 might help ] [recommended exercises 3.1, 3.2] Decision tree representation

More information

Question of the Day. Machine Learning 2D1431. Decision Tree for PlayTennis. Outline. Lecture 4: Decision Tree Learning

Question of the Day. Machine Learning 2D1431. Decision Tree for PlayTennis. Outline. Lecture 4: Decision Tree Learning Question of the Day Machine Learning 2D1431 How can you make the following equation true by drawing only one straight line? 5 + 5 + 5 = 550 Lecture 4: Decision Tree Learning Outline Decision Tree for PlayTennis

More information

the tree till a class assignment is reached

the tree till a class assignment is reached Decision Trees Decision Tree for Playing Tennis Prediction is done by sending the example down Prediction is done by sending the example down the tree till a class assignment is reached Definitions Internal

More information

CS 6375 Machine Learning

CS 6375 Machine Learning CS 6375 Machine Learning Decision Trees Instructor: Yang Liu 1 Supervised Classifier X 1 X 2. X M Ref class label 2 1 Three variables: Attribute 1: Hair = {blond, dark} Attribute 2: Height = {tall, short}

More information

Chapter 3: Decision Tree Learning

Chapter 3: Decision Tree Learning Chapter 3: Decision Tree Learning CS 536: Machine Learning Littman (Wu, TA) Administration Books? New web page: http://www.cs.rutgers.edu/~mlittman/courses/ml03/ schedule lecture notes assignment info.

More information

Imagine we ve got a set of data containing several types, or classes. E.g. information about customers, and class=whether or not they buy anything.

Imagine we ve got a set of data containing several types, or classes. E.g. information about customers, and class=whether or not they buy anything. Decision Trees Defining the Task Imagine we ve got a set of data containing several types, or classes. E.g. information about customers, and class=whether or not they buy anything. Can we predict, i.e

More information

Decision Trees.

Decision Trees. . Machine Learning Decision Trees Prof. Dr. Martin Riedmiller AG Maschinelles Lernen und Natürlichsprachliche Systeme Institut für Informatik Technische Fakultät Albert-Ludwigs-Universität Freiburg riedmiller@informatik.uni-freiburg.de

More information

CS6375: Machine Learning Gautam Kunapuli. Decision Trees

CS6375: Machine Learning Gautam Kunapuli. Decision Trees Gautam Kunapuli Example: Restaurant Recommendation Example: Develop a model to recommend restaurants to users depending on their past dining experiences. Here, the features are cost (x ) and the user s

More information

Classification: Decision Trees

Classification: Decision Trees Classification: Decision Trees Outline Top-Down Decision Tree Construction Choosing the Splitting Attribute Information Gain and Gain Ratio 2 DECISION TREE An internal node is a test on an attribute. A

More information

ML techniques. symbolic techniques different types of representation value attribute representation representation of the first order

ML techniques. symbolic techniques different types of representation value attribute representation representation of the first order MACHINE LEARNING Definition 1: Learning is constructing or modifying representations of what is being experienced [Michalski 1986], p. 10 Definition 2: Learning denotes changes in the system That are adaptive

More information

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

Outline. Training Examples for EnjoySport. 2 lecture slides for textbook Machine Learning, c Tom M. Mitchell, McGraw Hill, 1997 Outline Training Examples for EnjoySport Learning from examples General-to-specific ordering over hypotheses [read Chapter 2] [suggested exercises 2.2, 2.3, 2.4, 2.6] Version spaces and candidate elimination

More information

Decision Tree Learning - ID3

Decision Tree Learning - ID3 Decision Tree Learning - ID3 n Decision tree examples n ID3 algorithm n Occam Razor n Top-Down Induction in Decision Trees n Information Theory n gain from property 1 Training Examples Day Outlook Temp.

More information

Machine Learning Recitation 8 Oct 21, Oznur Tastan

Machine Learning Recitation 8 Oct 21, Oznur Tastan Machine Learning 10601 Recitation 8 Oct 21, 2009 Oznur Tastan Outline Tree representation Brief information theory Learning decision trees Bagging Random forests Decision trees Non linear classifier Easy

More information

Classification and Prediction

Classification and Prediction Classification Classification and Prediction Classification: predict categorical class labels Build a model for a set of classes/concepts Classify loan applications (approve/decline) Prediction: model

More information

Decision Trees. Gavin Brown

Decision Trees. Gavin Brown Decision Trees Gavin Brown Every Learning Method has Limitations Linear model? KNN? SVM? Explain your decisions Sometimes we need interpretable results from our techniques. How do you explain the above

More information

CS 380: ARTIFICIAL INTELLIGENCE MACHINE LEARNING. Santiago Ontañón

CS 380: ARTIFICIAL INTELLIGENCE MACHINE LEARNING. Santiago Ontañón CS 380: ARTIFICIAL INTELLIGENCE MACHINE LEARNING Santiago Ontañón so367@drexel.edu Summary so far: Rational Agents Problem Solving Systematic Search: Uninformed Informed Local Search Adversarial Search

More information

Administration. Chapter 3: Decision Tree Learning (part 2) Measuring Entropy. Entropy Function

Administration. Chapter 3: Decision Tree Learning (part 2) Measuring Entropy. Entropy Function Administration Chapter 3: Decision Tree Learning (part 2) Book on reserve in the math library. Questions? CS 536: Machine Learning Littman (Wu, TA) Measuring Entropy Entropy Function S is a sample of training

More information

Decision Trees.

Decision Trees. . Machine Learning Decision Trees Prof. Dr. Martin Riedmiller AG Maschinelles Lernen und Natürlichsprachliche Systeme Institut für Informatik Technische Fakultät Albert-Ludwigs-Universität Freiburg riedmiller@informatik.uni-freiburg.de

More information

Artificial Intelligence. Topic

Artificial Intelligence. Topic Artificial Intelligence Topic What is decision tree? A tree where each branching node represents a choice between two or more alternatives, with every branching node being part of a path to a leaf node

More information

Machine Learning 2nd Edi7on

Machine Learning 2nd Edi7on Lecture Slides for INTRODUCTION TO Machine Learning 2nd Edi7on CHAPTER 9: Decision Trees ETHEM ALPAYDIN The MIT Press, 2010 Edited and expanded for CS 4641 by Chris Simpkins alpaydin@boun.edu.tr h1p://www.cmpe.boun.edu.tr/~ethem/i2ml2e

More information

Supervised Learning! Algorithm Implementations! Inferring Rudimentary Rules and Decision Trees!

Supervised Learning! Algorithm Implementations! Inferring Rudimentary Rules and Decision Trees! Supervised Learning! Algorithm Implementations! Inferring Rudimentary Rules and Decision Trees! Summary! Input Knowledge representation! Preparing data for learning! Input: Concept, Instances, Attributes"

More information

Decision Tree Learning

Decision Tree Learning 0. Decision Tree Learning Based on Machine Learning, T. Mitchell, McGRAW Hill, 1997, ch. 3 Acknowledgement: The present slides are an adaptation of slides drawn by T. Mitchell PLAN 1. Concept learning:

More information

Introduction to ML. Two examples of Learners: Naïve Bayesian Classifiers Decision Trees

Introduction to ML. Two examples of Learners: Naïve Bayesian Classifiers Decision Trees Introduction to ML Two examples of Learners: Naïve Bayesian Classifiers Decision Trees Why Bayesian learning? Probabilistic learning: Calculate explicit probabilities for hypothesis, among the most practical

More information

Tutorial 6. By:Aashmeet Kalra

Tutorial 6. By:Aashmeet Kalra Tutorial 6 By:Aashmeet Kalra AGENDA Candidate Elimination Algorithm Example Demo of Candidate Elimination Algorithm Decision Trees Example Demo of Decision Trees Concept and Concept Learning A Concept

More information

DECISION TREE LEARNING. [read Chapter 3] [recommended exercises 3.1, 3.4]

DECISION TREE LEARNING. [read Chapter 3] [recommended exercises 3.1, 3.4] 1 DECISION TREE LEARNING [read Chapter 3] [recommended exercises 3.1, 3.4] Decision tree representation ID3 learning algorithm Entropy, Information gain Overfitting Decision Tree 2 Representation: Tree-structured

More information

Typical Supervised Learning Problem Setting

Typical Supervised Learning Problem Setting Typical Supervised Learning Problem Setting Given a set (database) of observations Each observation (x1,, xn, y) Xi are input variables Y is a particular output Build a model to predict y = f(x1,, xn)

More information

http://xkcd.com/1570/ Strategy: Top Down Recursive divide-and-conquer fashion First: Select attribute for root node Create branch for each possible attribute value Then: Split

More information

Classification and regression trees

Classification and regression trees Classification and regression trees Pierre Geurts p.geurts@ulg.ac.be Last update: 23/09/2015 1 Outline Supervised learning Decision tree representation Decision tree learning Extensions Regression trees

More information

Chapter 3: Decision Tree Learning (part 2)

Chapter 3: Decision Tree Learning (part 2) Chapter 3: Decision Tree Learning (part 2) CS 536: Machine Learning Littman (Wu, TA) Administration Books? Two on reserve in the math library. icml-03: instructional Conference on Machine Learning mailing

More information

Artificial Intelligence Decision Trees

Artificial Intelligence Decision Trees Artificial Intelligence Decision Trees Andrea Torsello Decision Trees Complex decisions can often be expressed in terms of a series of questions: What to do this Weekend? If my parents are visiting We

More information

M chi h n i e n L e L arni n n i g Decision Trees Mac a h c i h n i e n e L e L a e r a ni n ng

M chi h n i e n L e L arni n n i g Decision Trees Mac a h c i h n i e n e L e L a e r a ni n ng 1 Decision Trees 2 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

More information

Decision trees. Special Course in Computer and Information Science II. Adam Gyenge Helsinki University of Technology

Decision trees. Special Course in Computer and Information Science II. Adam Gyenge Helsinki University of Technology Decision trees Special Course in Computer and Information Science II Adam Gyenge Helsinki University of Technology 6.2.2008 Introduction Outline: Definition of decision trees ID3 Pruning methods Bibliography:

More information

brainlinksystem.com $25+ / hr AI Decision Tree Learning Part I Outline Learning 11/9/2010 Carnegie Mellon

brainlinksystem.com $25+ / hr AI Decision Tree Learning Part I Outline Learning 11/9/2010 Carnegie Mellon I Decision Tree Learning Part I brainlinksystem.com $25+ / hr Illah Nourbakhsh s version Chapter 8, Russell and Norvig Thanks to all past instructors Carnegie Mellon Outline Learning and philosophy Induction

More information

Decision Trees. Danushka Bollegala

Decision Trees. Danushka Bollegala Decision Trees Danushka Bollegala Rule-based Classifiers In rule-based learning, the idea is to learn a rule from train data in the form IF X THEN Y (or a combination of nested conditions) that explains

More information

Dan Roth 461C, 3401 Walnut

Dan Roth   461C, 3401 Walnut CIS 519/419 Applied Machine Learning www.seas.upenn.edu/~cis519 Dan Roth danroth@seas.upenn.edu http://www.cis.upenn.edu/~danroth/ 461C, 3401 Walnut Slides were created by Dan Roth (for CIS519/419 at Penn

More information

Machine Learning & Data Mining

Machine Learning & Data Mining Group M L D Machine Learning M & Data Mining Chapter 7 Decision Trees Xin-Shun Xu @ SDU School of Computer Science and Technology, Shandong University Top 10 Algorithm in DM #1: C4.5 #2: K-Means #3: SVM

More information

Decision Trees. CSC411/2515: Machine Learning and Data Mining, Winter 2018 Luke Zettlemoyer, Carlos Guestrin, and Andrew Moore

Decision Trees. CSC411/2515: Machine Learning and Data Mining, Winter 2018 Luke Zettlemoyer, Carlos Guestrin, and Andrew Moore Decision Trees Claude Monet, The Mulberry Tree Slides from Pedro Domingos, CSC411/2515: Machine Learning and Data Mining, Winter 2018 Luke Zettlemoyer, Carlos Guestrin, and Andrew Moore Michael Guerzhoy

More information

The Solution to Assignment 6

The Solution to Assignment 6 The Solution to Assignment 6 Problem 1: Use the 2-fold cross-validation to evaluate the Decision Tree Model for trees up to 2 levels deep (that is, the maximum path length from the root to the leaves is

More information

Decision Trees. Data Science: Jordan Boyd-Graber University of Maryland MARCH 11, Data Science: Jordan Boyd-Graber UMD Decision Trees 1 / 1

Decision Trees. Data Science: Jordan Boyd-Graber University of Maryland MARCH 11, Data Science: Jordan Boyd-Graber UMD Decision Trees 1 / 1 Decision Trees Data Science: Jordan Boyd-Graber University of Maryland MARCH 11, 2018 Data Science: Jordan Boyd-Graber UMD Decision Trees 1 / 1 Roadmap Classification: machines labeling data for us Last

More information

Decision Tree. Decision Tree Learning. c4.5. Example

Decision Tree. Decision Tree Learning. c4.5. Example Decision ree Decision ree Learning s of systems that learn decision trees: c4., CLS, IDR, ASSISA, ID, CAR, ID. Suitable problems: Instances are described by attribute-value couples he target function has

More information

Apprentissage automatique et fouille de données (part 2)

Apprentissage automatique et fouille de données (part 2) Apprentissage automatique et fouille de données (part 2) Telecom Saint-Etienne Elisa Fromont (basé sur les cours d Hendrik Blockeel et de Tom Mitchell) 1 Induction of decision trees : outline (adapted

More information

Decision Trees. Each internal node : an attribute Branch: Outcome of the test Leaf node or terminal node: class label.

Decision Trees. Each internal node : an attribute Branch: Outcome of the test Leaf node or terminal node: class label. Decision Trees Supervised approach Used for Classification (Categorical values) or regression (continuous values). The learning of decision trees is from class-labeled training tuples. Flowchart like structure.

More information

Decision Trees. Lewis Fishgold. (Material in these slides adapted from Ray Mooney's slides on Decision Trees)

Decision Trees. Lewis Fishgold. (Material in these slides adapted from Ray Mooney's slides on Decision Trees) Decision Trees Lewis Fishgold (Material in these slides adapted from Ray Mooney's slides on Decision Trees) Classification using Decision Trees Nodes test features, there is one branch for each value of

More information

Classification: Rule Induction Information Retrieval and Data Mining. Prof. Matteo Matteucci

Classification: Rule Induction Information Retrieval and Data Mining. Prof. Matteo Matteucci Classification: Rule Induction Information Retrieval and Data Mining Prof. Matteo Matteucci What is Rule Induction? The Weather Dataset 3 Outlook Temp Humidity Windy Play Sunny Hot High False No Sunny

More information

Decision Tree Learning

Decision Tree Learning Decision Tree Learning Goals for the lecture you should understand the following concepts the decision tree representation the standard top-down approach to learning a tree Occam s razor entropy and information

More information

Decision Trees Entropy, Information Gain, Gain Ratio

Decision Trees Entropy, Information Gain, Gain Ratio Changelog: 14 Oct, 30 Oct Decision Trees Entropy, Information Gain, Gain Ratio Lecture 3: Part 2 Outline Entropy Information gain Gain ratio Marina Santini Acknowledgements Slides borrowed and adapted

More information

Rule Generation using Decision Trees

Rule Generation using Decision Trees Rule Generation using Decision Trees Dr. Rajni Jain 1. Introduction A DT is a classification scheme which generates a tree and a set of rules, representing the model of different classes, from a given

More information

Notes on Machine Learning for and

Notes on Machine Learning for and Notes on Machine Learning for 16.410 and 16.413 (Notes adapted from Tom Mitchell and Andrew Moore.) Learning = improving with experience Improve over task T (e.g, Classification, control tasks) with respect

More information

Decision Trees Part 1. Rao Vemuri University of California, Davis

Decision Trees Part 1. Rao Vemuri University of California, Davis Decision Trees Part 1 Rao Vemuri University of California, Davis Overview What is a Decision Tree Sample Decision Trees How to Construct a Decision Tree Problems with Decision Trees Classification Vs Regression

More information

Classification Using Decision Trees

Classification Using Decision Trees Classification Using Decision Trees 1. Introduction Data mining term is mainly used for the specific set of six activities namely Classification, Estimation, Prediction, Affinity grouping or Association

More information

Decision Tree Analysis for Classification Problems. Entscheidungsunterstützungssysteme SS 18

Decision Tree Analysis for Classification Problems. Entscheidungsunterstützungssysteme SS 18 Decision Tree Analysis for Classification Problems Entscheidungsunterstützungssysteme SS 18 Supervised segmentation An intuitive way of thinking about extracting patterns from data in a supervised manner

More information

Algorithms for Classification: The Basic Methods

Algorithms for Classification: The Basic Methods Algorithms for Classification: The Basic Methods Outline Simplicity first: 1R Naïve Bayes 2 Classification Task: Given a set of pre-classified examples, build a model or classifier to classify new cases.

More information

Administrative notes. Computational Thinking ct.cs.ubc.ca

Administrative notes. Computational Thinking ct.cs.ubc.ca Administrative notes Labs this week: project time. Remember, you need to pass the project in order to pass the course! (See course syllabus.) Clicker grades should be on-line now Administrative notes March

More information

Classification: Decision Trees

Classification: Decision Trees Classification: Decision Trees These slides were assembled by Byron Boots, with grateful acknowledgement to Eric Eaton and the many others who made their course materials freely available online. Feel

More information

Induction on Decision Trees

Induction on Decision Trees Séance «IDT» de l'ue «apprentissage automatique» Bruno Bouzy bruno.bouzy@parisdescartes.fr www.mi.parisdescartes.fr/~bouzy Outline Induction task ID3 Entropy (disorder) minimization Noise Unknown attribute

More information

Topics. Bayesian Learning. What is Bayesian Learning? Objectives for Bayesian Learning

Topics. Bayesian Learning. What is Bayesian Learning? Objectives for Bayesian Learning Topics Bayesian Learning Sattiraju Prabhakar CS898O: ML Wichita State University Objectives for Bayesian Learning Bayes Theorem and MAP Bayes Optimal Classifier Naïve Bayes Classifier An Example Classifying

More information

Introduction to Machine Learning CMU-10701

Introduction to Machine Learning CMU-10701 Introduction to Machine Learning CMU-10701 23. Decision Trees Barnabás Póczos Contents Decision Trees: Definition + Motivation Algorithm for Learning Decision Trees Entropy, Mutual Information, Information

More information

Data classification (II)

Data classification (II) Lecture 4: Data classification (II) Data Mining - Lecture 4 (2016) 1 Outline Decision trees Choice of the splitting attribute ID3 C4.5 Classification rules Covering algorithms Naïve Bayes Classification

More information

Bayesian Learning. Artificial Intelligence Programming. 15-0: Learning vs. Deduction

Bayesian Learning. Artificial Intelligence Programming. 15-0: Learning vs. Deduction 15-0: Learning vs. Deduction Artificial Intelligence Programming Bayesian Learning Chris Brooks Department of Computer Science University of San Francisco So far, we ve seen two types of reasoning: Deductive

More information

Machine Learning Alternatives to Manual Knowledge Acquisition

Machine Learning Alternatives to Manual Knowledge Acquisition Machine Learning Alternatives to Manual Knowledge Acquisition Interactive programs which elicit knowledge from the expert during the course of a conversation at the terminal. Programs which learn by scanning

More information

Symbolic methods in TC: Decision Trees

Symbolic methods in TC: Decision Trees Symbolic methods in TC: Decision Trees ML for NLP Lecturer: Kevin Koidl Assist. Lecturer Alfredo Maldonado https://www.cs.tcd.ie/kevin.koidl/cs0/ kevin.koidl@scss.tcd.ie, maldonaa@tcd.ie 01-017 A symbolic

More information

Inductive Learning. Chapter 18. Material adopted from Yun Peng, Chuck Dyer, Gregory Piatetsky-Shapiro & Gary Parker

Inductive Learning. Chapter 18. Material adopted from Yun Peng, Chuck Dyer, Gregory Piatetsky-Shapiro & Gary Parker Inductive Learning Chapter 18 Material adopted from Yun Peng, Chuck Dyer, Gregory Piatetsky-Shapiro & Gary Parker Chapters 3 and 4 Inductive Learning Framework Induce a conclusion from the examples Raw

More information

Lecture 24: Other (Non-linear) Classifiers: Decision Tree Learning, Boosting, and Support Vector Classification Instructor: Prof. Ganesh Ramakrishnan

Lecture 24: Other (Non-linear) Classifiers: Decision Tree Learning, Boosting, and Support Vector Classification Instructor: Prof. Ganesh Ramakrishnan Lecture 24: Other (Non-linear) Classifiers: Decision Tree Learning, Boosting, and Support Vector Classification Instructor: Prof Ganesh Ramakrishnan October 20, 2016 1 / 25 Decision Trees: Cascade of step

More information

Learning Decision Trees

Learning Decision Trees Learning Decision Trees CS194-10 Fall 2011 Lecture 8 CS194-10 Fall 2011 Lecture 8 1 Outline Decision tree models Tree construction Tree pruning Continuous input features CS194-10 Fall 2011 Lecture 8 2

More information

Decision Support. Dr. Johan Hagelbäck.

Decision Support. Dr. Johan Hagelbäck. Decision Support Dr. Johan Hagelbäck johan.hagelback@lnu.se http://aiguy.org Decision Support One of the earliest AI problems was decision support The first solution to this problem was expert systems

More information

Einführung in Web- und Data-Science

Einführung in Web- und Data-Science Einführung in Web- und Data-Science Prof. Dr. Ralf Möller Universität zu Lübeck Institut für Informationssysteme Tanya Braun (Übungen) Inductive Learning Chapter 18/19 Chapters 3 and 4 Material adopted

More information

Bayesian Classification. Bayesian Classification: Why?

Bayesian Classification. Bayesian Classification: Why? Bayesian Classification http://css.engineering.uiowa.edu/~comp/ Bayesian Classification: Why? Probabilistic learning: Computation of explicit probabilities for hypothesis, among the most practical approaches

More information

Decision Tree And Random Forest

Decision Tree And Random Forest Decision Tree And Random Forest Dr. Ammar Mohammed Associate Professor of Computer Science ISSR, Cairo University PhD of CS ( Uni. Koblenz-Landau, Germany) Spring 2019 Contact: mailto: Ammar@cu.edu.eg

More information

Decision Tree Learning

Decision Tree Learning Decision Tree Learning Goals for the lecture you should understand the following concepts the decision tree representation the standard top-down approach to learning a tree Occam s razor entropy and information

More information

UVA CS 4501: Machine Learning

UVA CS 4501: Machine Learning UVA CS 4501: Machine Learning Lecture 21: Decision Tree / Random Forest / Ensemble Dr. Yanjun Qi University of Virginia Department of Computer Science Where are we? è Five major sections of this course

More information

( D) I(2,3) I(4,0) I(3,2) weighted avg. of entropies

( D) I(2,3) I(4,0) I(3,2) weighted avg. of entropies Decision Tree Induction using Information Gain Let I(x,y) as the entropy in a dataset with x number of class 1(i.e., play ) and y number of class (i.e., don t play outcomes. The entropy at the root, i.e.,

More information

Inductive Learning. Chapter 18. Why Learn?

Inductive Learning. Chapter 18. Why Learn? Inductive Learning Chapter 18 Material adopted from Yun Peng, Chuck Dyer, Gregory Piatetsky-Shapiro & Gary Parker Why Learn? Understand and improve efficiency of human learning Use to improve methods for

More information

Decision T ree Tree Algorithm Week 4 1

Decision T ree Tree Algorithm Week 4 1 Decision Tree Algorithm Week 4 1 Team Homework Assignment #5 Read pp. 105 117 of the text book. Do Examples 3.1, 3.2, 3.3 and Exercise 3.4 (a). Prepare for the results of the homework assignment. Due date

More information

CSCI 5622 Machine Learning

CSCI 5622 Machine Learning CSCI 5622 Machine Learning DATE READ DUE Mon, Aug 31 1, 2 & 3 Wed, Sept 2 3 & 5 Wed, Sept 9 TBA Prelim Proposal www.rodneynielsen.com/teaching/csci5622f09/ Instructor: Rodney Nielsen Assistant Professor

More information

Machine Learning 2010

Machine Learning 2010 Machine Learning 2010 Decision Trees Email: mrichter@ucalgary.ca -- 1 - Part 1 General -- 2 - Representation with Decision Trees (1) Examples are attribute-value vectors Representation of concepts by labeled

More information

Decision Tree Learning. Dr. Xiaowei Huang

Decision Tree Learning. Dr. Xiaowei Huang Decision Tree Learning Dr. Xiaowei Huang https://cgi.csc.liv.ac.uk/~xiaowei/ After two weeks, Remainders Should work harder to enjoy the learning procedure slides Read slides before coming, think them

More information

Information Theory & Decision Trees

Information Theory & Decision Trees Information Theory & Decision Trees Jihoon ang Sogang University Email: yangjh@sogang.ac.kr Decision tree classifiers Decision tree representation for modeling dependencies among input variables using

More information

MIDTERM: CS 6375 INSTRUCTOR: VIBHAV GOGATE October,

MIDTERM: CS 6375 INSTRUCTOR: VIBHAV GOGATE October, MIDTERM: CS 6375 INSTRUCTOR: VIBHAV GOGATE October, 23 2013 The exam is closed book. You are allowed a one-page cheat sheet. Answer the questions in the spaces provided on the question sheets. If you run

More information

Decision Tree Learning Lecture 2

Decision Tree Learning Lecture 2 Machine Learning Coms-4771 Decision Tree Learning Lecture 2 January 28, 2008 Two Types of Supervised Learning Problems (recap) Feature (input) space X, label (output) space Y. Unknown distribution D over

More information

CSCE 478/878 Lecture 6: Bayesian Learning

CSCE 478/878 Lecture 6: Bayesian Learning Bayesian Methods Not all hypotheses are created equal (even if they are all consistent with the training data) Outline CSCE 478/878 Lecture 6: Bayesian Learning Stephen D. Scott (Adapted from Tom Mitchell

More information

CS145: INTRODUCTION TO DATA MINING

CS145: INTRODUCTION TO DATA MINING CS145: INTRODUCTION TO DATA MINING 4: Vector Data: Decision Tree Instructor: Yizhou Sun yzsun@cs.ucla.edu October 10, 2017 Methods to Learn Vector Data Set Data Sequence Data Text Data Classification Clustering

More information

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

[read Chapter 2] [suggested exercises 2.2, 2.3, 2.4, 2.6] General-to-specific ordering over hypotheses 1 CONCEPT LEARNING AND THE GENERAL-TO-SPECIFIC ORDERING [read Chapter 2] [suggested exercises 2.2, 2.3, 2.4, 2.6] Learning from examples General-to-specific ordering over hypotheses Version spaces and

More information

ARTIFICIAL INTELLIGENCE. Supervised learning: classification

ARTIFICIAL INTELLIGENCE. Supervised learning: classification INFOB2KI 2017-2018 Utrecht University The Netherlands ARTIFICIAL INTELLIGENCE Supervised learning: classification Lecturer: Silja Renooij These slides are part of the INFOB2KI Course Notes available from

More information

Universität Potsdam Institut für Informatik Lehrstuhl Maschinelles Lernen. Intelligent Data Analysis. Decision Trees

Universität Potsdam Institut für Informatik Lehrstuhl Maschinelles Lernen. Intelligent Data Analysis. Decision Trees Universität Potsdam Institut für Informatik Lehrstuhl Maschinelles Lernen Intelligent Data Analysis Decision Trees Paul Prasse, Niels Landwehr, Tobias Scheffer Decision Trees One of many applications:

More information

Machine Learning 3. week

Machine Learning 3. week Machine Learning 3. week Entropy Decision Trees ID3 C4.5 Classification and Regression Trees (CART) 1 What is Decision Tree As a short description, decision tree is a data classification procedure which

More information

Reminders. HW1 out, due 10/19/2017 (Thursday) Group formations for course project due today (1 pt) Join Piazza (

Reminders. HW1 out, due 10/19/2017 (Thursday) Group formations for course project due today (1 pt) Join Piazza ( CS 145 Discussion 2 Reminders HW1 out, due 10/19/2017 (Thursday) Group formations for course project due today (1 pt) Join Piazza (email: juwood03@ucla.edu) Overview Linear Regression Z Score Normalization

More information