Data Mining for Knowledge Management. Classification



Similar documents
COMP3420: Advanced Databases and Data Mining. Classification and prediction: Introduction and Decision Tree Induction

Classification and Prediction

Data Mining Part 5. Prediction

Reference Books. Data Mining. Supervised vs. Unsupervised Learning. Classification: Definition. Classification k-nearest neighbors

Data Mining Classification: Decision Trees

Professor Anita Wasilewska. Classification Lecture Notes

Learning Example. Machine learning and our focus. Another Example. An example: data (loan application) The data and the goal

Data Mining: Foundation, Techniques and Applications

Classification and Prediction

Decision-Tree Learning

Data Mining: Concepts and Techniques

Decision Trees from large Databases: SLIQ

Data mining techniques: decision trees

Chapter 4 Data Mining A Short Introduction. 2006/7, Karl Aberer, EPFL-IC, Laboratoire de systèmes d'informations répartis Data Mining - 1

Social Media Mining. Data Mining Essentials

Data Mining. Session 7 Main Theme Classification and Prediction. Dr. Jean-Claude Franchitti

Data Mining Methods: Applications for Institutional Research

TOWARDS SIMPLE, EASY TO UNDERSTAND, AN INTERACTIVE DECISION TREE ALGORITHM

Gerry Hobbs, Department of Statistics, West Virginia University

Data Mining Techniques Chapter 6: Decision Trees

Decision Trees. JERZY STEFANOWSKI Institute of Computing Science Poznań University of Technology. Doctoral School, Catania-Troina, April, 2008

Classification algorithm in Data mining: An Overview

An Introduction to Data Mining. Big Data World. Related Fields and Disciplines. What is Data Mining? 2/12/2015

Lecture 10: Regression Trees

Data Mining Classification: Basic Concepts, Decision Trees, and Model Evaluation. Lecture Notes for Chapter 4. Introduction to Data Mining

Data Mining Practical Machine Learning Tools and Techniques

Knowledge Discovery and Data Mining

Chapter 12 Discovering New Knowledge Data Mining

Volume 4, Issue 1, January 2016 International Journal of Advance Research in Computer Science and Management Studies

Performance Analysis of Decision Trees

DATA MINING TECHNIQUES AND APPLICATIONS

Data Mining with R. Decision Trees and Random Forests. Hugh Murrell

A Study of Detecting Credit Card Delinquencies with Data Mining using Decision Tree Model

International Journal of Computer Science Trends and Technology (IJCST) Volume 2 Issue 3, May-Jun 2014

ENSEMBLE DECISION TREE CLASSIFIER FOR BREAST CANCER DATA

DECISION TREE INDUCTION FOR FINANCIAL FRAUD DETECTION USING ENSEMBLE LEARNING TECHNIQUES

Data Preprocessing. Week 2

Introduction to Learning & Decision Trees

EFFICIENT CLASSIFICATION OF BIG DATA USING VFDT (VERY FAST DECISION TREE)

Data Mining Algorithms Part 1. Dejan Sarka

Optimization of C4.5 Decision Tree Algorithm for Data Mining Application

Decision Trees. Andrew W. Moore Professor School of Computer Science Carnegie Mellon University.

CI6227: Data Mining. Lesson 11b: Ensemble Learning. Data Analytics Department, Institute for Infocomm Research, A*STAR, Singapore.

Discretization: An Enabling Technique

Knowledge Discovery and Data Mining

Classifying Large Data Sets Using SVMs with Hierarchical Clusters. Presented by :Limou Wang

EXPLORING & MODELING USING INTERACTIVE DECISION TREES IN SAS ENTERPRISE MINER. Copyr i g ht 2013, SAS Ins titut e Inc. All rights res er ve d.

Chapter 20: Data Analysis

A Survey of Classification Techniques in the Area of Big Data.

Customer Classification And Prediction Based On Data Mining Technique

Data Mining. Nonlinear Classification

Class #6: Non-linear classification. ML4Bio 2012 February 17 th, 2012 Quaid Morris

Classification Techniques (1)

Web Document Clustering

A Comparative Analysis of Classification Techniques on Categorical Data in Data Mining

Information Management course

Rule based Classification of BSE Stock Data with Data Mining

Data Mining Part 5. Prediction

Introduction to Data Mining

Classification On The Clouds Using MapReduce

A Data Mining Tutorial

International Journal of Computer Science Trends and Technology (IJCST) Volume 3 Issue 3, May-June 2015

Knowledge Discovery and Data Mining. Bootstrap review. Bagging Important Concepts. Notes. Lecture 19 - Bagging. Tom Kelsey. Notes

Medical Information Management & Mining. You Chen Jan,15, 2013 You.chen@vanderbilt.edu

DATA MINING USING INTEGRATION OF CLUSTERING AND DECISION TREE

An Overview of Knowledge Discovery Database and Data mining Techniques

Predicting the Risk of Heart Attacks using Neural Network and Decision Tree

A NEW DECISION TREE METHOD FOR DATA MINING IN MEDICINE

BOOSTING - A METHOD FOR IMPROVING THE ACCURACY OF PREDICTIVE MODEL

Knowledge Discovery and Data Mining. Structured vs. Non-Structured Data

An Overview of Data Mining: Predictive Modeling for IR in the 21 st Century

Supervised Learning (Big Data Analytics)

PREDICTING STUDENTS PERFORMANCE USING ID3 AND C4.5 CLASSIFICATION ALGORITHMS

Data Mining - Evaluation of Classifiers

Clustering Via Decision Tree Construction

Data Mining as a tool to Predict the Churn Behaviour among Indian bank customers

Index Contents Page No. Introduction . Data Mining & Knowledge Discovery

SURVEY OF TEXT CLASSIFICATION ALGORITHMS FOR SPAM FILTERING

BIDM Project. Predicting the contract type for IT/ITES outsourcing contracts

DESIGN AND DEVELOPMENT OF DATA MINING MODELS FOR THE PREDICTION OF MANPOWER PLACEMENT IN THE TECHNICAL DOMAIN

AnalysisofData MiningClassificationwithDecisiontreeTechnique

BUSINESS ANALYTICS. Data Pre-processing. Lecture 3. Information Systems and Machine Learning Lab. University of Hildesheim.

Machine Learning using MapReduce

Classification: Basic Concepts, Decision Trees, and Model Evaluation

Data Mining. Knowledge Discovery, Data Warehousing and Machine Learning Final remarks. Lecturer: JERZY STEFANOWSKI

Data Mining on Streams

Data Mining Project Report. Document Clustering. Meryem Uzun-Per

REVIEW OF ENSEMBLE CLASSIFICATION

Machine Learning. Mausam (based on slides by Tom Mitchell, Oren Etzioni and Pedro Domingos)

Data Mining. Cluster Analysis: Advanced Concepts and Algorithms

Data Mining Analytics for Business Intelligence and Decision Support

Data Mining. 1 Introduction 2 Data Mining methods. Alfred Holl Data Mining 1

How To Solve The Kd Cup 2010 Challenge

Comparison of Non-linear Dimensionality Reduction Techniques for Classification with Gene Expression Microarray Data

COURSE RECOMMENDER SYSTEM IN E-LEARNING

Chapter 7. Feature Selection. 7.1 Introduction

An Overview and Evaluation of Decision Tree Methodology

Supervised Feature Selection & Unsupervised Dimensionality Reduction

Transcription:

1 Data Mining for Knowledge Management Classification Themis Palpanas University of Trento http://disi.unitn.eu/~themis Data Mining for Knowledge Management 1 Thanks for slides to: Jiawei Han Eamonn Keogh Andrew Moore Mingyue Tan Data Mining for Knowledge Management 2

2 Roadmap What is classification? What is Support Vector Machines (SVM) prediction? Associative classification Issues regarding classification Lazy learners (or learning from and prediction your neighbors) Classification by decision tree Other classification methods induction Prediction Bayesian classification Accuracy and error measures Rule-based classification Ensemble methods Classification by back Model selection propagation Summary Data Mining for Knowledge Management 3 Classification vs. Prediction Classification predicts categorical class labels (discrete or nominal) classifies data (constructs a model) based on the training set and the values (class labels) in a classifying attribute and uses it in classifying new data Prediction models continuous-valued functions, i.e., predicts unknown or missing values Typical applications Credit approval Target marketing Medical diagnosis Fraud detection Data Mining for Knowledge Management 4

Classification A Two-Step Process Model construction: describing a set of predetermined classes Each tuple/sample is assumed to belong to a predefined class, as determined by the class label attribute The set of tuples used for model construction is training set The model is represented as classification rules, decision trees, or mathematical formulae Model usage: for classifying future or unknown objects Estimate accuracy of the model The known label of test sample is compared with the classified result from the model Accuracy rate is the percentage of test set samples that are correctly classified by the model Test set is independent of training set, otherwise over-fitting will occur If the accuracy is acceptable, use the model to classify data tuples whose class labels are not known Data Mining for Knowledge Management 5 Process (1): Model Construction Training Data NAM E RANK YEARS TENURED M ike Assistant Prof 3 no M ary A ssistant P rof 7 yes B ill P rofessor 2 yes Jim A ssociate P rof 7 yes Dave Assistant Prof 6 no Anne Associate Prof 3 no Data Mining for Knowledge Management 6 3

Process (1): Model Construction Training Data Classification Algorithms NAM E RANK YEARS TENURED M ike Assistant Prof 3 no M ary A ssistant P rof 7 yes B ill P rofessor 2 yes Jim A ssociate P rof 7 yes Dave Assistant Prof 6 no Anne Associate Prof 3 no Classifier (Model) Data Mining for Knowledge Management 7 Process (1): Model Construction Training Data Classification Algorithms NAM E RANK YEARS TENURED M ike Assistant Prof 3 no M ary A ssistant P rof 7 yes B ill P rofessor 2 yes Jim A ssociate P rof 7 yes Dave Assistant Prof 6 no Anne Associate Prof 3 no Classifier (Model) IF rank = professor OR years > 6 THEN tenured = yes Data Mining for Knowledge Management 8 4

Process (2): Using the Model in Prediction Classifier Testing Data NAM E RANK YEARS TENURED Tom A ssistant P rof 2 no M erlisa A ssociate P rof 7 no G eorge P rofessor 5 yes Joseph A ssistant P rof 7 yes Data Mining for Knowledge Management 9 Process (2): Using the Model in Prediction Classifier Testing Data Unseen Data NAM E RANK YEARS TENURED Tom A ssistant P rof 2 no M erlisa A ssociate P rof 7 no G eorge P rofessor 5 yes Joseph A ssistant P rof 7 yes (Jeff, Professor, 4) Tenured? Data Mining for Knowledge Management 10 5

Process (2): Using the Model in Prediction Classifier Testing Data Unseen Data (Jeff, Professor, 4) NAM E RANK YEARS TENURED Tom A ssistant P rof 2 no M erlisa A ssociate P rof 7 no G eorge P rofessor 5 yes Joseph A ssistant P rof 7 yes Tenured? Data Mining for Knowledge Management 11 Supervised vs. Unsupervised Learning Supervised learning (classification) Supervision: The training data (observations, measurements, etc.) are accompanied by labels indicating the class of the observations New data is classified based on the training set Unsupervised learning (clustering) The class labels of training data is unknown Given a set of measurements, observations, etc. with the aim of establishing the existence of classes or clusters in the data Data Mining for Knowledge Management 12 6

7 Roadmap What is classification? What is Support Vector Machines (SVM) prediction? Associative classification Issues regarding classification Lazy learners (or learning from and prediction your neighbors) Classification by decision tree Other classification methods induction Prediction Bayesian classification Accuracy and error measures Rule-based classification Ensemble methods Classification by back Model selection propagation Summary Data Mining for Knowledge Management 13 Issues: Data Preparation Data cleaning Preprocess data in order to reduce noise and handle missing values Relevance analysis (feature selection) Remove the irrelevant or redundant attributes Data transformation Generalize and/or normalize data Data Mining for Knowledge Management

8 Issues: Evaluating Classification Methods Accuracy classifier accuracy: predicting class label predictor accuracy: guessing value of predicted attributes Speed time to construct the model (training time) time to use the model (classification/prediction time) Robustness: handling noise and missing values Scalability: efficiency in disk-resident databases Interpretability understanding and insight provided by the model Other measures, e.g., goodness of rules, such as decision tree size or compactness of classification rules Data Mining for Knowledge Management 15 Roadmap What is classification? What is Support Vector Machines (SVM) prediction? Associative classification Issues regarding classification Lazy learners (or learning from and prediction your neighbors) Classification by decision tree Other classification methods induction Prediction Bayesian classification Accuracy and error measures Rule-based classification Ensemble methods Classification by back Model selection propagation Summary Data Mining for Knowledge Management 16

9 Decision Tree Induction: Training Dataset age income student credit_rating buys_computer <=30 high no fair no <=30 high no excellent no 31 40 high no fair yes >40 medium no fair yes >40 low yes fair yes >40 low yes excellent no 31 40 low yes excellent yes <=30 medium no fair no <=30 low yes fair yes >40 medium yes fair yes <=30 medium yes excellent yes 31 40 medium no excellent yes 31 40 high yes fair yes >40 medium no excellent no Data Mining for Knowledge Management 17 Output: A Decision Tree for buys_computer age? <=30 overcast 31..40 >40 student? yes credit rating? no yes excellent fair no yes yes Data Mining for Knowledge Management 18

10 Algorithm for Decision Tree Induction Basic algorithm (a greedy algorithm) Tree is constructed in a top-down recursive divide-and-conquer manner At start, all the training examples are at the root Attributes are categorical (if continuous-valued, they are discretized in advance) Examples are partitioned recursively based on selected attributes Test attributes are selected on the basis of a heuristic or statistical measure (e.g., information gain) Conditions for stopping partitioning All samples for a given node belong to the same class There are no remaining attributes for further partitioning majority voting is employed for classifying the leaf There are no samples left Data Mining for Knowledge Management 19 Attribute Selection Measure: Information Gain (ID3/C4.5) Select the attribute with the highest information gain Let p i be the probability that an arbitrary tuple in D belongs to class C i, estimated by C i, D / D Expected information (entropy) needed to classify a tuple in D: m Info D) p i log ( p ) ( 2 i 1 Information needed (after using attribute A to split D into v v partitions) to classify D: Dj InfoA( D) I( D j ) D Information gained by branching on attribute A Gain(A) j 1 Info(D) Info (D) Data Mining for Knowledge Management 20 A i

11 Attribute Selection: Information Gain Class P: buys_computer = yes Info age ( D) Class N: buys_computer = no 9 9 5 5 Info( D) I(9,5) log2( ) log2( ) 0.940 age p i n i I(p i, n i ) <=30 2 3 0.971 31 40 4 0 0 >40 3 2 0.971 I(3,2) 5 I (2,3) means age <=30 has 5 out of samples, with 2 yes es and 3 no s. Hence 0.694 age income student credit_rating buys_computer <=30 high no fair no age <=30 high no excellent no 31 40 high no fair yes >40 medium no fair yes Similarly, >40 low yes fair yes >40 low yes excellent no 31 40 low yes excellent yes Gain( income) 0.029 <=30 medium no fair no <=30 low yes fair yes Gain( student) 0.151 >40 medium yes fair yes <=30 medium yes excellent yes 31 40 medium no excellent yes Gain( credit _ rating) 0.048 31 40 high yes fair yes >40 medium no excellent Data Mining no for Knowledge Management 21 5 5 I(2,3) 4 Gain( age) Info( D) Info ( D) I(4,0) 0.246 Computing Information-Gain for Continuous-Value Attributes Let attribute A be a continuous-valued attribute Must determine the best split point for A Sort the value A in increasing order Typically, the midpoint between each pair of adjacent values is considered as a possible split point (a i +a i+1 )/2 is the midpoint between the values of a i and a i+1 The point with the minimum expected information requirement for A is selected as the split-point for A Split: D1 is the set of tuples in D satisfying A split-point, and D2 is the set of tuples in D satisfying A > split-point Data Mining for Knowledge Management 22

12 Gain Ratio for Attribute Selection (C4.5) Information gain measure is biased towards attributes with a large number of values C4.5 (a successor of ID3) uses gain ratio to overcome the problem (normalization to information gain) Ex. v D j D j SplitInfoA ( D) log2( ) j 1 D D GainRatio(A) = Gain(A)/SplitInfo(A) 4 4 6 6 SplitInfo A D) log2( ) log2( ) gain_ratio(income) = 0.029/0.926 = 0.031 4 log ( ) The attribute with the maximum gain ratio is selected as the splitting attribute 4 ( 2 0.926 Data Mining for Knowledge Management 23 Gini index (CART, IBM IntelligentMiner) If a data set D contains examples from n classes, gini index, gini(d) is defined as where p j is the relative frequency of class j in D If a data set D is split on A into two subsets D 1 and D 2, the gini index gini(d) is defined as D ( ) 1 D D gini( ) 2 D1 gini( D2) Reduction in Impurity: gini( D) gini A n p 2 j j 1 A The attribute provides the smallest gini split (D) (or the largest reduction in impurity) is chosen to split the node (need to enumerate all the possible splitting points for each attribute) 1 D D gini( A) gini( D) gini ( D) Data Mining for Knowledge Management 24

13 Gini index (CART, IBM IntelligentMiner) Ex. D has 9 tuples in buys_computer = yes and 5 in no gini( D) 0.459 Suppose the attribute income partitions D into 10 in D 1 : {low, medium} and 4 in D 10 4 2 giniincome low, medium } D) Gini( D1 ) Gini( 1 9 2 5 { ( D1 2 ) but gini {medium,high} is 0.30 and thus the best since it is the lowest All attributes are assumed continuous-valued May need other tools, e.g., clustering, to get the possible split values Can be modified for categorical attributes Data Mining for Knowledge Management 25 Comparing Attribute Selection Measures The three measures, in general, return good results but Information gain: biased towards multivalued attributes Gain ratio: tends to prefer unbalanced splits in which one partition is much smaller than the others Gini index: biased to multivalued attributes has difficulty when # of classes is large tends to favor tests that result in equal-sized partitions and purity in both partitions Data Mining for Knowledge Management 26

Other Attribute Selection Measures CHAID: a popular decision tree algorithm, measure based on χ 2 test for independence C-SEP: performs better than info. gain and gini index in certain cases G-statistics: has a close approximation to χ 2 distribution MDL (Minimal Description Length) principle (i.e., the simplest solution is preferred): The best tree as the one that requires the fewest # of bits to both (1) encode the tree, and (2) encode the exceptions to the tree Multivariate splits (partition based on multiple variable combinations) CART: finds multivariate splits based on a linear comb. of attrs. Which attribute selection measure is the best? Most give good results, none is significantly superior than others Data Mining for Knowledge Management 27 Overfitting and Tree Pruning Overfitting: An induced tree may overfit the training data Too many branches, some may reflect anomalies due to noise or outliers Poor accuracy for unseen samples Two approaches to avoid overfitting Prepruning: Halt tree construction early do not split a node if this would result in the goodness measure falling below a threshold Difficult to choose an appropriate threshold Postpruning: Remove branches from a fully grown tree get a sequence of progressively pruned trees Use a set of data different from the training data to decide which is the best pruned tree Data Mining for Knowledge Management 28

15 Enhancements to Basic Decision Tree Induction Allow for continuous-valued attributes Dynamically define new discrete-valued attributes that partition the continuous attribute value into a discrete set of intervals Handle missing attribute values Assign the most common value of the attribute Assign probability to each of the possible values Attribute construction Create new attributes based on existing ones that are sparsely represented This reduces fragmentation, repetition, and replication Data Mining for Knowledge Management 29