CS690L Data Mining: Classification

Slides:



Advertisements
Similar presentations
COMP3740 CR32: Knowledge Management and Adaptive Systems
Advertisements

Data Mining Lecture 9.
DECISION TREES. Decision trees  One possible representation for hypotheses.
1 Machine Learning: Lecture 3 Decision Tree Learning (Based on Chapter 3 of Mitchell T.., Machine Learning, 1997)
CPSC 502, Lecture 15Slide 1 Introduction to Artificial Intelligence (AI) Computer Science cpsc502, Lecture 15 Nov, 1, 2011 Slide credit: C. Conati, S.
Classification Algorithms
Data Mining Techniques: Classification. Classification What is Classification? –Classifying tuples in a database –In training set E each tuple consists.
IT 433 Data Warehousing and Data Mining
Decision Tree Approach in Data Mining
Data Mining Classification: Basic Concepts, Decision Trees, and Model Evaluation Lecture Notes for Chapter 4 Part I Introduction to Data Mining by Tan,
Classification Techniques: Decision Tree Learning
Chapter 7 – Classification and Regression Trees
Chapter 7 – Classification and Regression Trees
Decision Trees Instructor: Qiang Yang Hong Kong University of Science and Technology Thanks: Eibe Frank and Jiawei Han.
Decision Tree Rong Jin. Determine Milage Per Gallon.
ID3 Algorithm Abbas Rizvi CS157 B Spring What is the ID3 algorithm? ID3 stands for Iterative Dichotomiser 3 Algorithm used to generate a decision.
Constructing Decision Trees. A Decision Tree Example The weather data example. ID codeOutlookTemperatureHumidityWindyPlay abcdefghijklmnabcdefghijklmn.
1 Classification with Decision Trees Instructor: Qiang Yang Hong Kong University of Science and Technology Thanks: Eibe Frank and Jiawei.
Classification: Decision Trees
Induction of Decision Trees
1 Classification with Decision Trees I Instructor: Qiang Yang Hong Kong University of Science and Technology Thanks: Eibe Frank and Jiawei.
Decision Trees an Introduction.
Example of a Decision Tree categorical continuous class Splitting Attributes Refund Yes No NO MarSt Single, Divorced Married TaxInc NO < 80K > 80K.
© Prentice Hall1 DATA MINING Introductory and Advanced Topics Part II Margaret H. Dunham Department of Computer Science and Engineering Southern Methodist.
Classification: Decision Trees 2 Outline  Top-Down Decision Tree Construction  Choosing the Splitting Attribute  Information Gain and Gain Ratio.
Machine Learning Lecture 10 Decision Trees G53MLE Machine Learning Dr Guoping Qiu1.
Chapter 7 Decision Tree.
ETHEM ALPAYDIN © The MIT Press, Lecture Slides for.
Data Mining: Classification
Machine Learning Chapter 3. Decision Tree Learning
Mohammad Ali Keyvanrad
Chapter 9 – Classification and Regression Trees
Classification I. 2 The Task Input: Collection of instances with a set of attributes x and a special nominal attribute Y called class attribute Output:
Lecture 7. Outline 1. Overview of Classification and Decision Tree 2. Algorithm to build Decision Tree 3. Formula to measure information 4. Weka, data.
Decision-Tree Induction & Decision-Rule Induction
Data Mining Practical Machine Learning Tools and Techniques Chapter 4: Algorithms: The Basic Methods Section 4.3: Decision Trees Rodney Nielsen Many of.
Classification and Prediction Compiled By: Umair Yaqub Lecturer Govt. Murray College Sialkot Readings: Chapter 6 – Han and Kamber.
Data Mining – Algorithms: Decision Trees - ID3 Chapter 4, Section 4.3.
For Monday No new reading Homework: –Chapter 18, exercises 3 and 4.
MACHINE LEARNING 10 Decision Trees. Motivation  Parametric Estimation  Assume model for class probability or regression  Estimate parameters from all.
Classification Algorithms Decision trees Rule-based induction Neural networks Memory(Case) based reasoning Genetic algorithms Bayesian networks Basic Principle.
Decision Trees Binary output – easily extendible to multiple output classes. Takes a set of attributes for a given situation or object and outputs a yes/no.
Decision Trees, Part 1 Reading: Textbook, Chapter 6.
Decision Trees Example of a Decision Tree categorical continuous class Refund MarSt TaxInc YES NO YesNo Married Single, Divorced < 80K> 80K Splitting.
Decision Tree Learning
1 Classification: predicts categorical class labels (discrete or nominal) classifies data (constructs a model) based on the training set and the values.
Data Mining By Farzana Forhad CS 157B. Agenda Decision Tree and ID3 Rough Set Theory Clustering.
Outline Decision tree representation ID3 learning algorithm Entropy, Information gain Issues in decision tree learning 2.
Decision Trees by Muhammad Owais Zahid
Chapter 3 Data Mining: Classification & Association Chapter 4 in the text box Section: 4.3 (4.3.1),
DATA MINING TECHNIQUES (DECISION TREES ) Presented by: Shweta Ghate MIT College OF Engineering.
Data Mining Chapter 4 Algorithms: The Basic Methods - Constructing decision trees Reporter: Yuen-Kuei Hsueh Date: 2008/7/24.
Review of Decision Tree Learning Bamshad Mobasher DePaul University Bamshad Mobasher DePaul University.
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.
Chapter 6 Decision Tree.
DECISION TREES An internal node represents a test on an attribute.
Decision Trees an introduction.
Machine Learning Lecture 2: Decision Tree Learning.
Classification Algorithms
Prepared by: Mahmoud Rafeek Al-Farra
Artificial Intelligence
Data Science Algorithms: The Basic Methods
Decision Tree Saed Sayad 9/21/2018.
Classification and Prediction
Classification by Decision Tree Induction
Machine Learning Chapter 3. Decision Tree Learning
Machine Learning Chapter 3. Decision Tree Learning
©Jiawei Han and Micheline Kamber
Data Mining CSCI 307, Spring 2019 Lecture 15
Presentation transcript:

CS690L Data Mining: Classification Reference: J. Han and M. Kamber, Data Mining: Concepts and Techniques Yong Fu: http://web.umr.edu/~yongjian/cs401dm/

Classification Classification determine the class or category of an object based on its properties Two stages Learning stage: construction of a classification function or model Classification stage: prediction of classes of objects using the function or model Tools for classification Decision tree Bayesian networks Neural networks Regression Problem Given a set of objects whose classes are known called training set derive a classification model which can correctly classify future objects

Classification: Decision Tree Classification model: decision tree Method: Top Down Induction of Decision Trees Data representation: Every object is represented by a vector of values on a fixed set of attributes. If a relation is defined on the attributes an object is a tuple in the relation. A special attribute called class attribute tells the group/category the object belongs to which is the dependent attribute to be predicted Learning stage: Induction of a decision tree that classifies the training set Classification stage: The decision tree will classify new objects.

An Example Definitions A decision tree is a tree in which each non-leaf node corresponds to an attribute of objects and each branch from a non-leaf node to its children represents a value of the attribute. Each leaf node in a decision tree is labeled by a class of the objects Classification using decision trees Starting from the root an object follows the path to a leaf node which gives the class of the object taking branches according to its values along the way Alternative view of decision tree Node/Branch: discrimination test Node: subset of objects satisfying test

Decision Tree Induction Induction of decision trees: Starting from a training set recursively selecting attributes to split nodes thus partitioning the objects Termination condition: when to stop splitting a node Selection of attribute for splitting testing: Best split A measure for splitting? ID3 algorithm Selection: attribute information gain Termination condition: all objects are in a single class

ID3 Algorithm

ID3 Algorithm (Cont)

Example

Example: Decision Tree Building Information content of C (Expected information for the classification) I(P) = Ent(C)= - {(9/14) log2 ( 9/14) + (5/14)log2 (5/14)} = 0.940 For each Attribute Ai Step 1: Compute the entropy for a given attribute Ai Ent(Sunny) = - ((2/5 log2 2/5) + (3/5 log2 3/5)) = 0.97 Ent(Rainy) = 0.97 Ent(Overcast) = 0 Step 2: Compute the Entropy (expected information based on the partitioning into Subsets by A) Ent(C, Outlook) = (5/14)Ent(Sunny) + (5/14)Ent(Rainy) + (4/14)Ent(Overcast) = (5/14)(0.97) + (5/14)(0.97) + (4/14)(0) = 0.69 Step 3: Gain(C, Outlook) = Ent(C) – Ent(C, Outlook) = 0.940 – 0.69 = 0.25 Select the attribute that maximize information gain Build a node for the selected attribute Recursively build nodes.

Level1: Decision Tree Building Outlook Overcast Rainy Sunny Temp Hum Wind Class 83 88 False P 64 65 True P 72 90 False P 81 75 False P Temp Hum Wind Class 85 85 False DP 80 90 True DP 72 95 False DP 69 70 False P 75 70 True P Temp Hum Wind Class 96 False P 80 False P 70 True DP 80 False P 71 96 True DP

Decision Tree

Generated Rules

ID3 Algorithm

C4.5 Extensions to ID3 Gain ratio: Gain favors attributes with many values GainRatio (C, A) = Gain(C, A)/Ent(P) where P = (|T1|/|C|, |T2|/C, … |Tm|/|C|) and Ti are partitions of C based on object’s value of A. e.g. GainRatio (Outlook) = Gain(Outlook)/ {(5/14) log2 (5/14) + (5/14)log2 (5/14) + (4/14)log2 (4/14) } Missing values: consider only objects without the attribute is defined. Continuous attributes: consider all binary splits A <= ai and A > ai where ai is the ith values of A. compute the gain or gain ratio and choose the split that maximizes the gain or gain ratio Over-fitting: Change the termination condition. If a subtree is dominated by a class stop splitting Tree pruning: replacing a subtree by a single leaf node. When the expected classification error can be reduced Rule deriving: A rule basically corresponds to a path from root to a leaf The LHS is the conjunction of testing and the RHS is the class prediction Rule simplification: removing some conditions in the LHS

Evaluation of Decision Tree Methods Complexity Expressive power Robustness Effectiveness