The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Classification COMP 790-90 Seminar BCB 713 Module Spring 2011.

Slides:



Advertisements
Similar presentations
Association Rule Mining
Advertisements

Recap: Mining association rules from large datasets
CpSc 3220 File and Database Processing Lecture 17 Indexed Files.
Huffman Codes and Asssociation Rules (II) Prof. Sin-Min Lee Department of Computer Science.
Data Mining (Apriori Algorithm)DCS 802, Spring DCS 802 Data Mining Apriori Algorithm Spring of 2002 Prof. Sung-Hyuk Cha School of Computer Science.
Decision Tree Approach in Data Mining
Mining High-Speed Data Streams Presented by: Tyler J. Sawyer UVM Spring CS 332 Data Mining Pedro Domingos Geoff Hulten Sixth ACM SIGKDD International.
Association Rule Mining. 2 The Task Two ways of defining the task General –Input: A collection of instances –Output: rules to predict the values of any.
10 -1 Lecture 10 Association Rules Mining Topics –Basics –Mining Frequent Patterns –Mining Frequent Sequential Patterns –Applications.
Association rules The goal of mining association rules is to generate all possible rules that exceed some minimum user-specified support and confidence.
Autocorrelation and Linkage Cause Bias in Evaluation of Relational Learners David Jensen and Jennifer Neville.
Rakesh Agrawal Ramakrishnan Srikant
Association Analysis. Association Rule Mining: Definition Given a set of records each of which contain some number of items from a given collection; –Produce.
Data Mining Association Analysis: Basic Concepts and Algorithms Lecture Notes for Chapter 6 Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach,
Data Mining Association Analysis: Basic Concepts and Algorithms Lecture Notes for Chapter 6 Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach,
Data Mining Association Analysis: Basic Concepts and Algorithms Lecture Notes for Chapter 6 Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach,
1 Fast Algorithms for Mining Association Rules Rakesh Agrawal Ramakrishnan Srikant.
Mining Association Rules. Association rules Association rules… –… can predict any attribute and combinations of attributes … are not intended to be used.
Data Mining Association Analysis: Basic Concepts and Algorithms
4/3/01CS632 - Data Mining1 Data Mining Presented By: Kevin Seng.
1 Mining Quantitative Association Rules in Large Relational Database Presented by Jin Jin April 1, 2004.
Data Mining Association Analysis: Basic Concepts and Algorithms
Ensemble Learning: An Introduction
FPtree/FPGrowth. FP-Tree/FP-Growth Algorithm Use a compressed representation of the database using an FP-tree Then use a recursive divide-and-conquer.
Hash Tables1 Part E Hash Tables  
© Vipin Kumar CSci 8980 Fall CSci 8980: Data Mining (Fall 2002) Vipin Kumar Army High Performance Computing Research Center Department of Computer.
Fast Algorithms for Association Rule Mining
Is Sampling Useful in Data Mining? A Case in the Maintenance of Discovered Association Rules S.D. Lee David W. Cheung Ben Kao The University of Hong Kong.
Mining Association Rules
1 Fast Algorithms for Mining Association Rules Rakesh Agrawal Ramakrishnan Srikant Slides from Ofer Pasternak.
Classification by Association Rules: Use Minimum Set of Rules Jianyu Yang December 10, 2003.
Mining Association Rules in Large Databases. What Is Association Rule Mining?  Association rule mining: Finding frequent patterns, associations, correlations,
Association Discovery from Databases Association rules are a simple formalism for expressing positive connections between columns in a 0/1 matrix. A classical.
Mining Optimal Decision Trees from Itemset Lattices Dr, Siegfried Nijssen Dr. Elisa Fromont KDD 2007.
CS685 : Special Topics in Data Mining, UKY The UNIVERSITY of KENTUCKY Classification - SVM CS 685: Special Topics in Data Mining Jinze Liu.
Approximate Frequency Counts over Data Streams Gurmeet Singh Manku, Rajeev Motwani Standford University VLDB2002.
Data Mining Association Analysis: Basic Concepts and Algorithms Lecture Notes for Chapter 6 Introduction to Data Mining By Tan, Steinbach, Kumar Lecture.
Modul 7: Association Analysis. 2 Association Rule Mining  Given a set of transactions, find rules that will predict the occurrence of an item based on.
Association Rules. CS583, Bing Liu, UIC 2 Association rule mining Proposed by Agrawal et al in Initially used for Market Basket Analysis to find.
Chapter 2: Association Rules & Sequential Patterns.
1 Mining Association Rules Mohamed G. Elfeky. 2 Introduction Data mining is the discovery of knowledge and useful information from the large amounts of.
Chapter 2: Association Rules & Sequential Patterns.
Bab 5 Classification: Alternative Techniques Part 1 Rule-Based Classifer.
Expert Systems with Applications 34 (2008) 459–468 Multi-level fuzzy mining with multiple minimum supports Yeong-Chyi Lee, Tzung-Pei Hong, Tien-Chin Wang.
Stefan Mutter, Mark Hall, Eibe Frank University of Freiburg, Germany University of Waikato, New Zealand The 17th Australian Joint Conference on Artificial.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Association Rule Mining III COMP Seminar GNET 713 BCB Module Spring 2007.
CS685 : Special Topics in Data Mining, UKY The UNIVERSITY of KENTUCKY Classification - SVM CS 685: Special Topics in Data Mining Spring 2008 Jinze Liu.
Association Rule Mining Data Mining and Knowledge Discovery Prof. Carolina Ruiz and Weiyang Lin Department of Computer Science Worcester Polytechnic Institute.
CS690L Data Mining: Classification
© Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ Data Mining: Association Analysis This lecture node is modified based on Lecture Notes for.
CS685 : Special Topics in Data Mining, UKY The UNIVERSITY of KENTUCKY Classification - SVM CS 685: Special Topics in Data Mining Jinze Liu.
M. Sulaiman Khan Dept. of Computer Science University of Liverpool 2009 COMP527: Data Mining ARM: Improvements March 10, 2009 Slide.
Association Analysis (3)
Data Mining Association Rules Mining Frequent Itemset Mining Support and Confidence Apriori Approach.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Association Rule Mining COMP Seminar BCB 713 Module Spring 2011.
1 Data Mining Lecture 6: Association Analysis. 2 Association Rule Mining l Given a set of transactions, find rules that will predict the occurrence of.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Mining Complex Data COMP Seminar Spring 2011.
1 Discriminative Frequent Pattern Analysis for Effective Classification Presenter: Han Liang COURSE PRESENTATION:
Chapter 3 Data Mining: Classification & Association Chapter 4 in the text box Section: 4.3 (4.3.1),
Frequent Sub-Structure-Based Approaches for Classifying Chemical Compounds Mukund Deshpande, Michihiro Kuramochi, George Karypis University of Minnesota,
Mining High-Speed Data Streams Presented by: William Kniffin Pedro Domingos Geoff Hulten Sixth ACM SIGKDD International Conference
Classification - CBA CS 485: Special Topics in Data Mining Jinze Liu.
Data Mining: Concepts and Techniques
Frequent Pattern Mining
Data Mining Association Analysis: Basic Concepts and Algorithms
Association Rule Mining
Data Mining Association Analysis: Basic Concepts and Algorithms
CS 685: Special Topics in Data Mining Spring 2008 Jinze Liu
CS 685: Special Topics in Data Mining Spring 2009 Jinze Liu
Association Analysis: Basic Concepts
Presentation transcript:

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Classification COMP Seminar BCB 713 Module Spring 2011

COMP Data Mining: Concepts, Algorithms, and Applications 2 Classification based on Association Classification rule mining versus Association rule mining Aim A small set of rules as classifier All rules according to minsup and minconf Syntax X  y X  Y

COMP Data Mining: Concepts, Algorithms, and Applications 3 Why & How to Integrate Both classification rule mining and association rule mining are indispensable to practical applications. The integration is done by focusing on a special subset of association rules whose right-hand-side are restricted to the classification class attribute. CARs: class association rules

COMP Data Mining: Concepts, Algorithms, and Applications 4 CBA: Three Steps Discretize continuous attributes, if any Generate all class association rules (CARs) Build a classifier based on the generated CARs.

COMP Data Mining: Concepts, Algorithms, and Applications 5 Our Objectives To generate the complete set of CARs that satisfy the user-specified minimum support (minsup) and minimum confidence (minconf) constraints. To build a classifier from the CARs.

COMP Data Mining: Concepts, Algorithms, and Applications 6 Rule Generator: Basic Concepts Ruleitem :condset is a set of items, y is a class label Each ruleitem represents a rule: condset->y condsupCount The number of cases in D that contain condset rulesupCount The number of cases in D that contain the condset and are labeled with class y Support =(rulesupCount/|D|)*100% Confidence =(rulesupCount/condsupCount)*100%

COMP Data Mining: Concepts, Algorithms, and Applications 7 RG: Basic Concepts (Cont.) Frequent ruleitems A ruleitem is frequent if its support is above minsup Accurate rule A rule is accurate if its confidence is above minconf Possible rule For all ruleitems that have the same condset, the ruleitem with the highest confidence is the possible rule of this set of ruleitems. The set of class association rules (CARs) consists of all the possible rules (PRs) that are both frequent and accurate.

COMP Data Mining: Concepts, Algorithms, and Applications 8 RG: An Example A ruleitem: assume that the support count of the condset (condsupCount) is 3, the support of this ruleitem (rulesupCount) is 2, and |D|=10 then (A,1),(B,1) -> (class,1) supt=20% (rulesupCount/|D|)*100% confd=66.7% (rulesupCount/condsupCount)*100%

COMP Data Mining: Concepts, Algorithms, and Applications 9 RG: The Algorithm 1 F 1 = {large 1-ruleitems}; 2 CAR 1 = genRules (F 1 ); 3 prCAR 1 = pruneRules (CAR 1 ); //count the item and class occurrences to determine the frequent 1-ruleitems and prune it 4 for (k = 2; F k-1  Ø; k++) do 5 C k = candidateGen (F k-1 ); //generate the candidate ruleitems C k using the frequent ruleitems F k-1 6 for each data case d  D do //scan the database 7 C d = ruleSubset (C k, d); //find all the ruleitems in C k whose condsets are supported by d 8 for each candidate c  C d do 9 c.condsupCount++; 10 if d.class = c.class then c.rulesupCount++; //update various support counts of the candidates in C k 11 end 12 end

COMP Data Mining: Concepts, Algorithms, and Applications 10 RG: The Algorithm(cont.) 13 F k = {c  C k | c.rulesupCount  minsup}; //select those new frequent ruleitems to form F k 14 CAR k = genRules(F k ); //select the ruleitems both accurate and frequent 15 prCAR k = pruneRules(CAR k ); 16 end 17 CARs =  k CAR k ; 18 prCARs =  k prCAR k ;

COMP Data Mining: Concepts, Algorithms, and Applications 11 Class Builder M1: Basic Concepts Given two rules r i and r j, define: r i  r j if The confidence of r i is greater than that of r j, or Their confidences are the same, but the support of r i is greater than that of r j, or Both the confidences and supports are the same, but r i is generated earlier than r j. Our classifier is of the following format:, where r i  R, r a  r b if b>a

COMP Data Mining: Concepts, Algorithms, and Applications 12 M1: Three Steps The basic idea is to choose a set of high precedence rules in R to cover D. Sort the set of generated rules R Select rules for the classifier from R following the sorted sequence and put in C. Each selected rule has to correctly classify at least one additional case. Also select default class and compute errors. Discard those rules in C that don’t improve the accuracy of the classifier. Locate the rule with the lowest error rate and discard the rest rules in the sequence.

COMP Data Mining: Concepts, Algorithms, and Applications 13 Example ABCDEClass 00110Y 00011N 01110Y 11110Y 01001N BY 40% CY 60% DY 60% EN 40% BCY 40% BDY 40% CDY 60% BCDY 40% RuleItemsetsSupport Min_support = 40%Min_conf = 50%

COMP Data Mining: Concepts, Algorithms, and Applications 14 Example B  Y 66.7% 40% C  Y 100% 60% D  Y 75% 60% E  N 100% 40% BC  Y 100% 40% BD  Y 100% 40% CD  Y 100% 60% BCD  Y 100% 40% RulesSupportConfidence

COMP Data Mining: Concepts, Algorithms, and Applications 15 B  Y 66.7% 40% D  Y 75% 60% BCD  Y 100% 40% BD  Y 100% 40% BC  Y 100% 40% E  N 100% 40% CD  Y 100% 60% C  Y 100% 60% Example RulesSupportConfidence

COMP Data Mining: Concepts, Algorithms, and Applications 16 Example B  Y 66.7% 40% D  Y 75% 60% BCD  Y 100% 40% BD  Y 100% 40% BC  Y 100% 40% E  N 100% 40% CD  Y 100% 60% C  Y 100% 60% RulesSupportConfidence ABCDEClass 00110Y 00011N 01110Y 11110Y 01001N

COMP Data Mining: Concepts, Algorithms, and Applications 17 Example B  Y 66.7% 40% D  Y 75% 60% BCD  Y 100% 40% BD  Y 100% 40% BC  Y 100% 40% E  N 100% 40% CD  Y 100% 60% C  Y 100% 60% RulesSupportConfidence ABCDEClass 00110Y 00011N 01110Y 11110Y 01001N Default classification accuracy 60%

COMP Data Mining: Concepts, Algorithms, and Applications 18 Example B  Y 66.7% 40% D  Y 75% 60% BCD  Y 100% 40% BD  Y 100% 40% BC  Y 100% 40% E  N 100% 40% CD  Y 100% 60% C  Y 100% 60% RulesSupportConfidence ABCDEClass 00110Y 00011N 01110Y 11110Y 01001N

COMP Data Mining: Concepts, Algorithms, and Applications 19 Example B  Y 66.7% 40% D  Y 75% 60% BCD  Y 100% 40% BD  Y 100% 40% BC  Y 100% 40% E  N 100% 40% CD  Y 100% 60% C  Y 100% 60% RulesSupportConfidence ABCDEClass 00110Y 00011N 01110Y 11110Y 01001N 

COMP Data Mining: Concepts, Algorithms, and Applications 20 Example B  Y 66.7% 40% D  Y 75% 60% BCD  Y 100% 40% BD  Y 100% 40% BC  Y 100% 40% E  N 100% 40% CD  Y 100% 60% C  Y 100% 60% RulesSupportConfidence ABCDEClass 00110Y 00011N 01110Y 11110Y 01001N 

COMP Data Mining: Concepts, Algorithms, and Applications 21 Example B  Y 66.7% 40% D  Y 75% 60% BCD  Y 100% 40% BD  Y 100% 40% BC  Y 100% 40% E  N 100% 40% CD  Y 100% 60% C  Y 100% 60% RulesSupportConfidence ABCDEClass 00110Y 00011N 01110Y 11110Y 01001N      

COMP Data Mining: Concepts, Algorithms, and Applications 22 M1: Algorithm 1 R = sort(R); //Step1:sort R according to the relation “  ” 2 for each rule r  R in sequence do 3 temp = Ø ; 4 for each case d  D do //go through D to find those cases covered by each rule r 5 if d satisfies the conditions of r then 6 store d.id in temp and mark r if it correctly classifies d; 7 if r is marked then 8 insert r at the end of C; //r will be a potential rule because it can correctly classify at least one case d 9 delete all the cases with the ids in temp from D; 10 selecting a default class for the current C; //the majority class in the remaining data 11 compute the total number of errors of C; 12 end 13 end // Step 2 14 Find the first rule p in C with the lowest total number of errors and drop all the rules after p in C; 15 Add the default class associated with p to end of C, and return C (our classifier). //Step 3

COMP Data Mining: Concepts, Algorithms, and Applications 23 M1: Two conditions it satisfies Each training case is covered by the rule with the highest precedence among the rules that can cover the case. Every rule in C correctly classifies at least one remaining training case when it is chosen.

COMP Data Mining: Concepts, Algorithms, and Applications 24 M1: Conclusion The algorithm is simple, but inefficient especially when the database is not resident in the main memory. It needs too many passes over the database. The improved algorithm M2 takes slightly more than one pass.

COMP Data Mining: Concepts, Algorithms, and Applications 25 M2: Basic Concepts Key trick: instead of making one pass over the remaining data for each rule, we find the best rule in R to cover each case. cRule: highest precedence rule correctly classifying d wRule: highest precedence rule wrongly classifying d Three steps Find all cRules needed (when cRule  wRule) Find all wRules needed (when wRule  cRule) Remove rules with high error

COMP Data Mining: Concepts, Algorithms, and Applications 26 M2: Stage 1 1 Q = Ø ; U = Ø ; A = Ø ; 2 for each case d  D do 3 cRule = maxCoverRule(C c, d); 4 wRule = maxCoverRule(C w, d); 5 U = U ⋃ {cRule}; 6 cRule.classCasesCovered[d.class]++; 7 if cRule ≻ wRule then 8 Q = Q ⋃ {cRule}; 9 mark cRule; 10 else A = A ⋃ 11 end

COMP Data Mining: Concepts, Algorithms, and Applications 27 Funs & Vars of Stage 1 (M2) maxCoverRule finds the highest precedence rule that covers the case d. d.id represent the identification number of d d.class represent the class of d r.classCasesCovered[d.class] record how many cases rule r covers in d.class

COMP Data Mining: Concepts, Algorithms, and Applications 28 M2: Stage 2 1 for each entry  A do 2 if wRule is marked then 3 cRule.classCasesCovered[y]--; 4 wRule.classCasesCovered[y]++; 5 else wSet = allCoverRules(U, dID.case, cRule); 6 for each rule w  wSet do 7 w.replace = w.replace ⋃ { }; 8 w.classCasesCovered[y]++; 9 end 10 Q = Q ⋃ wSet 11 end 12 end

COMP Data Mining: Concepts, Algorithms, and Applications 29 Funs & Vars of Stage 2 (M2) allCoverRules find all the rules that wrongly classify the specified case and have higher precedences than that of its cRule. r.replace record the information that rule r can replace some cRule of a case

COMP Data Mining: Concepts, Algorithms, and Applications 30 M2: Stage 3 1 classDistr = compClassDistri(D); 2 ruleErrors = 0; 3 Q = sort(Q); 4 for each rule r in Q in sequence do 5 if r.classCasesCovered[r.class]  0 then 6 for each entry in r.replace do 7 if the dID case has been covered by a previous r then r.classCasesCovered[y]--; 9 else rul.classCasesCovered[y]--; 10 ruleErrors = ruleErrors + errorsOfRule(r); 11 classDistr = update(r, classDistr); 12 defaultClass = selectDefault(classDistr); 13 defaultErrors = defErr(defaultClass, classDistr); 14 totalErrors = ruleErrors + defaultErrors; 15 Insert at end of C 16 end 17 end 18 Find the first rule p in C with the lowest totalErrors, and then discard all the rules after p from C; 19 Add the default class associated with p to end of C; 20 Return C without totalErrors and default-class;

COMP Data Mining: Concepts, Algorithms, and Applications 31 Funs & Vars of Stage 3 (M2) compClassDistr counts the number of training cases in each class in the initial training data. ruleErrors records the number of errors made so far by the selected rules on the training data. defaultClass number of errors of the chosen default Class. totalErrors the total number of errors of selected rules in C and the default class.

COMP Data Mining: Concepts, Algorithms, and Applications 32 Empirical Evaluation Compare with C4.5 Selection of minconf and minsup Limit candidates in memory Discretization (Entropy method 1993) DEC alpha 500, 192MB

COMP Data Mining: Concepts, Algorithms, and Applications 33 Evaluation