Decision Tree Example MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way.

Slides:



Advertisements
Similar presentations
Artificial Intelligence 11. Decision Tree Learning Course V231 Department of Computing Imperial College, London © Simon Colton.
Advertisements

Data Mining Lecture 9.
1 Machine Learning: Lecture 3 Decision Tree Learning (Based on Chapter 3 of Mitchell T.., Machine Learning, 1997)
Decision Tree Learning
Decision Tree Learning - ID3
Decision Trees Decision tree representation ID3 learning algorithm
Machine Learning III Decision Tree Induction
1er. Escuela Red ProTIC - Tandil, de Abril, Decision Tree Learning 3.1 Introduction –Method for approximation of discrete-valued target functions.
Decision Tree Algorithm (C4.5)
ICS320-Foundations of Adaptive and Learning Systems
Classification Techniques: Decision Tree Learning
ID3 Algorithm Abbas Rizvi CS157 B Spring What is the ID3 algorithm? ID3 stands for Iterative Dichotomiser 3 Algorithm used to generate a decision.
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.
Decision Tree Learning
Part 7.3 Decision Trees Decision tree representation ID3 learning algorithm Entropy, information gain Overfitting.
CS 590M Fall 2001: Security Issues in Data Mining Lecture 4: ID3.
Comparing between machine learning methods for a remote monitoring system. Ronit Zrahia Final Project Tel-Aviv University.
Decision Tree Learning Learning Decision Trees (Mitchell 1997, Russell & Norvig 2003) –Decision tree induction is a simple but powerful learning paradigm.
Induction of Decision Trees
Decision Trees IDHairHeightWeightLotionResult SarahBlondeAverageLightNoSunburn DanaBlondeTallAverageYesnone AlexBrownTallAverageYesNone AnnieBlondeShortAverageNoSunburn.
Ch 3. Decision Tree Learning
Classification and Prediction by Yen-Hsien Lee Department of Information Management College of Management National Sun Yat-Sen University March 4, 2003.
Machine Learning Reading: Chapter Text Classification  Is text i a finance new article? PositiveNegative.
Mehdi Ghayoumi MSB rm 132 Ofc hr: Thur, a Machine Learning.
Machine Learning Lecture 10 Decision Trees G53MLE Machine Learning Dr Guoping Qiu1.
ID3 and Decision tree by Tuan Nguyen May 2008.
NAÏVE BAYES CLASSIFIER 1 ACM Student Chapter, Heritage Institute of Technology 10 th February, 2012 SIGKDD Presentation by Anirban Ghose Parami Roy Sourav.
National Centre for Agricultural Economics and Policy Research (NCAP), New Delhi Rajni Jain
Machine Learning Chapter 3. Decision Tree Learning
Learning what questions to ask. 8/29/03Decision Trees2  Job is to build a tree that represents a series of questions that the classifier will ask of.
CS 484 – Artificial Intelligence1 Announcements List of 5 source for research paper Homework 5 due Tuesday, October 30 Book Review due Tuesday, October.
Artificial Intelligence 7. Decision trees
Machine Learning CS 165B Spring 2012
Machine Learning Decision Tree.
Mohammad Ali Keyvanrad
Classification with Decision Trees and Rules Evgueni Smirnov.
Machine Learning Lecture 10 Decision Tree Learning 1.
CpSc 810: Machine Learning Decision Tree Learning.
Decision-Tree Induction & Decision-Rule Induction
Decision Tree Learning
Data Mining-Knowledge Presentation—ID3 algorithm Prof. Sin-Min Lee Department of Computer Science.
Artificial Intelligence Project #3 : Analysis of Decision Tree Learning Using WEKA May 23, 2006.
Artificial Intelligence 8. Supervised and unsupervised learning Japan Advanced Institute of Science and Technology (JAIST) Yoshimasa Tsuruoka.
Decision Tree Learning
Seminar on Machine Learning Rada Mihalcea Decision Trees Very short intro to Weka January 27, 2003.
SEEM Tutorial 1 Classification: Decision tree Siyuan Zhang,
Iterative Dichotomiser 3 By Christopher Archibald.
Friday’s Deliverable As a GROUP, you need to bring 2N+1 copies of your “initial submission” –This paper should be a complete version of your paper – something.
Decision Trees MSE 2400 EaLiCaRA Dr. Tom Way.
CSE343/543 Machine Learning: Lecture 4.  Chapter 3: Decision Trees  Weekly assignment:  There are lot of applications and systems using machine learning.
Review of Decision Tree Learning Bamshad Mobasher DePaul University Bamshad Mobasher DePaul University.
Decision Tree Learning CMPT 463. Reminders Homework 7 is due on Tuesday, May 10 Projects are due on Tuesday, May 10 o Moodle submission: readme.doc and.
CSE573 Autumn /09/98 Machine Learning Administrative –Last topic: Decision Tree Learning Reading: 5.1, 5.4 Last time –finished NLP sample system’s.
CSE573 Autumn /11/98 Machine Learning Administrative –Finish this topic –The rest of the time is yours –Final exam Tuesday, Mar. 17, 2:30-4:20.
Decision Tree Learning
ICS320-Foundations of Adaptive and Learning Systems
Machine Learning Inductive Learning and Decision Trees
DECISION TREES An internal node represents a test on an attribute.
Decision Tree Learning
Machine Learning Lecture 2: Decision Tree Learning.
Classification Algorithms
Decision Tree Learning
Decision Trees: Another Example
Decision Tree Saed Sayad 9/21/2018.
Machine Learning Chapter 3. Decision Tree Learning
Machine Learning: Lecture 3
Play Tennis ????? Day Outlook Temperature Humidity Wind PlayTennis
Machine Learning Chapter 3. Decision Tree Learning
Decision Trees Decision tree representation ID3 learning algorithm
Decision Tree.
Presentation transcript:

Decision Tree Example MSE 2400 EaLiCaRA Spring 2015 Dr. Tom Way

Decision Tree Learning (1) Decision tree induction is a simple but powerful learning paradigm. In this method a set of training examples is broken down into smaller and smaller subsets while at the same time an associated decision tree get incrementally developed. At the end of the learning process, a decision tree covering the training set is returned. The decision tree can be thought of as a set sentences (in Disjunctive Normal Form) written propositional logic. MSE 2400 Evolution & Learning2

Decision Tree Learning (2) Some characteristics of problems that are well suited to Decision Tree Learning are: –Attribute-value paired elements –Discrete target function –Disjunctive descriptions (of target function) –Works well with missing or erroneous training data MSE 2400 Evolution & Learning3

Decision Tree (goal?) (Outlook = Sunny  Humidity = Normal)  (Outlook = Overcast)  (Outlook = Rain  Wind = Weak) [See: Tom M. Mitchell, Machine Learning, McGraw-Hill, 1997] MSE 2400 Evolution & Learning4

Play Tennis Data DayOutlookTemperatureHumidityWindPlayTennis D1SunnyHotHighWeakNo D2 SunnyHotHighStrongNo D3OvercastHotHighWeakYes D4RainMildHighWeakYes D5RainCoolNormalWeakYes D6RainCoolNormalStrongNo D7OvercastCoolNormalStrongYes D8SunnyMildHighWeakNo D9SunnyCoolNormalWeakYes D10RainMildNormalWeakYes D11SunnyMildNormalStrongYes D12OvercastMildHighStrongYes D13OvercastHotNormalWeakYes D14RainMildHighStrongNo MSE 2400 Evolution & Learning5

Building a Decision Tree 1.First test all attributes and select the one that would function as the best root; 2.Break-up the training set into subsets based on the branches of the root node; 3.Test the remaining attributes to see which ones fit best underneath the branches of the root node; 4.Continue this process for all other branches until a.all examples of a subset are of one type b.there are no examples left (return majority classification of the parent) c.there are no more attributes left (default value should be majority classification) MSE 2400 Evolution & Learning6

Finding Best Attribute Determining which attribute is best (Entropy & Gain) Entropy (E) is the minimum number of bits needed in order to classify an arbitrary example as yes or no E(S) =  c i=1 –p i log 2 p i, –Where S is a set of training examples, –c is the number of classes, and –p i is the proportion of the training set that is of class i For our entropy equation 0 log 2 0 = 0 The information gain G(S,A) where A is an attribute G(S,A)  E(S) -  v in Values(A) (|S v | / |S|) * E(Sv) MSE 2400 Evolution & Learning7

Example (1) Let’s Try an Example! Let –E([X+,Y-]) represent that there are X positive training elements and Y negative elements. Therefore the Entropy for the training data, E(S), can be represented as E([9+,5-]) because of the 14 training examples 9 of them are yes and 5 of them are no. MSE 2400 Evolution & Learning8

Example (2) Let’s start off by calculating the Entropy of the Training Set. E(S) = E([9+,5-]) = (-9/14 log 2 9/14) + (-5/14 log 2 5/14) = 0.94 MSE 2400 Evolution & Learning9

Example (3) Next we will need to calculate the information gain G(S,A) for each attribute A where A is taken from the set {Outlook, Temperature, Humidity, Wind}. MSE 2400 Evolution & Learning10

Example (4) The information gain for Outlook is: –G(S,Outlook) = E(S) – [5/14 * E(Outlook=sunny) + 4/14 * E(Outlook = overcast) + 5/14 * E(Outlook=rain)] –G(S,Outlook) = E([9+,5-]) – [5/14*E(2+,3-) + 4/14*E([4+,0-]) + 5/14*E([3+,2-])] –G(S,Outlook) = 0.94 – [5/14* /14* /14*0.971] –G(S,Outlook) = MSE 2400 Evolution & Learning11

Example (5) G(S,Temperature) = 0.94 – [4/14*E(Temperature=hot) + 6/14*E(Temperature=mild) + 4/14*E(Temperature=cool)] G(S,Temperature) = 0.94 – [4/14*E([2+,2-]) + 6/14*E([4+,2-]) + 4/14*E([3+,1-])] G(S,Temperature) = 0.94 – [4/14 + 6/14* /14*0.811] G(S,Temperature) = MSE 2400 Evolution & Learning12

Example (6) G(S,Humidity) = 0.94 – [7/14*E(Humidity=high) + 7/14*E(Humidity=normal)] G(S,Humidity = 0.94 – [7/14*E([3+,4-]) + 7/14*E([6+,1-])] G(S,Humidity = 0.94 – [7/14* /14*0.592] G(S,Humidity) = MSE 2400 Evolution & Learning13

Example (7) G(S,Wind) = 0.94 – [8/14* /14*1.00] G(S,Wind) = MSE 2400 Evolution & Learning14

Example (8) Outlook is our winner! MSE 2400 Evolution & Learning15

Next Level (1) Now that we have discovered the root of our decision tree we must now recursively find the nodes that should go below Sunny, Overcast, and Rain. MSE 2400 Evolution & Learning16

Next Level (2) G(Outlook=Rain, Humidity) = – [2/5*E(Outlook=Rain ^ Humidity=high) + 3/5*E(Outlook=Rain ^Humidity=normal] G(Outlook=Rain, Humidity) = 0.02 G(Outlook=Rain,Wind) = [3/5*0 + 2/5*0] G(Outlook=Rain,Wind) = MSE 2400 Evolution & Learning17

Next Level (3) Now our decision tree looks like: MSE 2400 Evolution & Learning18