0% found this document useful (0 votes)
3K views

Data Mining - Classification Using Frequent Pattern

The document discusses two methods for classification using frequent patterns: associative classification and discriminative frequent pattern-based classification. Associative classification involves mining frequent itemsets from data, generating association rules from the frequent itemsets, and organizing the rules into a classifier. Support and confidence are used to measure the strength of association rules. An example algorithm for associative classification is also provided. Discriminative frequent pattern-based classification directly mines only the most discriminative frequent patterns rather than all patterns. A general framework involves feature generation by mining frequent patterns from each class, feature selection to identify discriminative patterns, and building a classification model. The DDPMine algorithm follows a more direct approach.

Uploaded by

winda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3K views

Data Mining - Classification Using Frequent Pattern

The document discusses two methods for classification using frequent patterns: associative classification and discriminative frequent pattern-based classification. Associative classification involves mining frequent itemsets from data, generating association rules from the frequent itemsets, and organizing the rules into a classifier. Support and confidence are used to measure the strength of association rules. An example algorithm for associative classification is also provided. Discriminative frequent pattern-based classification directly mines only the most discriminative frequent patterns rather than all patterns. A general framework involves feature generation by mining frequent patterns from each class, feature selection to identify discriminative patterns, and building a classification model. The DDPMine algorithm follows a more direct approach.

Uploaded by

winda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Member’s Name

Nabila Sabita Ihsani (1301174489)


Ni Putu Winda Ardiyanti (1301174460)

1. How to find confusion matrix for class more than 2 ? and how to calculate the
accuracy ?

The total numbers of false negative (TFN), false positive (TFP), and true
negative (TTN) for each class i will be calculated based on the Generalized
Equations 1, 2, and 3, respectively. The total true positive in the system will
be obtained through Equation 4.
1. First Equation

2. Second Equation

3. Third Equation

4. Fourth Equation

 
To compute the generalized precision (P), recall (R), and specificity(S) for
each class i, we use :
5. Fifth Equation

6. Sixth Equation

7. Seventh Equation

And after that we calculate the overall accuracy;

2. Classification using Frequent Pattern

Frequent pattern(itemsets) discovery is an important problem in associative


classification rule mining. Frequent pattern show interesting relationships between
attribute-value pairs that occur frequently in a given data set. For example, we may find
that the attribute-value pairs age = youth and credit = OK occur in 20% of data tuples
describing All Electronics customers who buy a computer. We can think of each
attribute–value pair as an item, so the search for these frequent patterns is known as
“frequent pattern mining” or “frequent itemset mining” . Sometimes, association rules is
derived by frequent pattern but in this section we will examine how frequent patterns can
be used for classification.
There are two methods for classification using frequent patterns. The first method
is ​associative classification​, where the association rules are generated from frequent
patterns and can be used for classification. The second one is ​discriminative frequent
pattern-based classification​, where frequent patterns serve as combined features, which
are considered in addition to single features when building a classification model.
2.1 Associative Classification

Associative classification (AC) is a promising data mining approach that


integrates classification and ​association rule​ discovery to build classification models
(classifiers). Before we go to associative classification let’s look at association rule
mining in general. Association rules are mined in a two-step process;
a. frequent itemset mining, in this step we searches for patterns of attribute–value
pairs that occur repeatedly in a data set.
b. rule generation, in this step we analyze the frequent itemsets to generate
association rules. All association rules must satisfy certain criteria regarding their
“​accuracy​” (or confidence) and the proportion of the data set that they actually
represent (referred to as support).
For example, the following is an association rules mined from a data set, D, shown with
its confidence and support:

In the last decade, several AC algorithms have been proposed such as Classification
based Association (CBA), Classification based on Predicted Association Rule (CPAR),
Multi-class Classification using Association Rule (MCAR). ​Generally, Associative
Classification consists of three major processes;
a. Mine the data for frequent itemsets, that is, find commonly occurring
attribute–value pairs in the data​, in this step we mines the complete set
of association rules from a training dataset. These association rules are
called class association rules.
b. Analyze the frequent itemsets to generate association rules per class,
which satisfy confidence and support criteria​, this step we evaluated the
association rules identified by the rule discovery process and selecting the
rules, which gives the best accuracy, to form a classifier.
c. Organize the rules to form a rule-based classifier. ​in this step we
organizes data samples from a test dataset.

2.1.1 How To Measures the Support and Confidence value ?


1. Support
Support is an idea of how frequent itemset​ ​is in all the transactions. Consider ​itemset1​ =
{bread} and ​itemset2​ = {shampoo}. There will be far more transactions containing bread
than those containing shampoo. So, ​itemset1​ will generally have a higher support than
itemset2.​ Mathematically, support is the fraction of the total number of transactions in
which the itemset occurs.

2. Confidence
Confidence measures the likeliness of occurrence of consequent on the cart given that
the cart already has antecedents. For example we have transaction {bread}->{milk}, and
also we have {bread}->{butter}. If we want to calculate the confidence of
{bread}->{milk} so we have to calculate all the transaction that containing {bread} and
{milk} divided by all the transaction that contains {bread}. Mathematically we can say
as:

3. Example How to Find the Confidence and Support Value in a Transaction

Suppose we have 10 transactions on the table below


Item 1 Item 2 Confidence Support

{bread} {milk} 2/3 2/10

{bread} {milk} 2/3 2/10

{bread} {butter} 1/3 1/10

{milk} {sugar} 1/4 1/10

{coffee} {tea} 4/5 3/10

{coffee} {tea} 4/5 3/10

{coffee} {tea} 4/5 3/10

{cereal} {milk} 1/2 1/10

{cereal} {coffee} 1/2 1/10

{coffee} {tea} 4/5 1/10


From the above transaction we can know about the items opportunity, and also we can
predict about the items that we want to sell later. For example from the table above we know that
{bread},{milk},{coffee}, and {tea} are the items that has the high value of the confident and
support, so means that those items are the popular one among other items, so if we confuse
between to save our money to buy {tea} or {cereal}, the data above can help us to decide it.

2.1.1 Example Algorithm


In this method we will use the ​Classification Based on Associations(CBA)
• Mine possible association rules in the form of Cond-set (a set of attribute-value pairs)
class label
• Build classifier: Organize rules according to decreasing precedence based on confidence
and then support
•The Algorithm:

2.2 Discriminative Frequent Pattern-Based Classification


From work on associative classification, we see that frequent patterns reflect strong
associations between attribute–value pairs (or items) in data and are useful for
classification. Frequent patterns represent feature combinations. For example we have the
discriminative power of frequent patterns and single features.
This picture plots the Information Gain vs. Pattern Length where the
discriminative power of some frequent patterns is higher than that of single features for
three UCI data sets.
The figure above plots information gain versus pattern frequency (support) for
three UCI data sets. A theoretical upper bound on information gain (IGUpperBound) is
also shown

The general framework for discriminative frequent pattern–based classification is as


follows.
a. Feature generation​: The data, D, are partitioned according to class label. Use
frequent itemset mining to discover frequent patterns in each partition, satisfying
minimum support. The collection of frequent patterns, F, makes up the feature
candidates.
b. Feature selection:​ Apply feature selection to F, resulting in FS, the set of
selected (more discriminating) frequent patterns.
c. Learning of classification model​: A classifier is built on the data set D 0 . Any
learning algorithm can be used as the classification model.
​Figure above are the general framework for discriminative frequent pattern–based
classification explained in an image

To improve the efficiency of the general framework, consider condensing steps 1


and 2 in the figure above into just one step. That is, rather than generating the complete
set of frequent patterns, it’s possible to mine only the highly discriminative ones. This
more direct approach is referred to as direct discriminative pattern mining.
The DDPMine algorithm follows this approach. ​First ​we have to transform the
training data into a compact tree structure known as a frequent pattern tree, or FP-tree,
which holds all of the attribute–value (itemset) association information. It then searches
for discriminative patterns on the tree. The approach is direct in that it avoids generating
a large number of indiscriminate patterns. It incrementally reduces the problem by
eliminating training tuples. This further speeds up the mining process. By choosing to
transform the original data to an FP-tree, DDPMine avoids generating redundant patterns
because an FP-tree stores only the closed frequent patterns. By definition, any subpattern,
β, of a closed pattern, α, is redundant with respect to α . DDPMine directly mines the
discriminative patterns and integrates feature selection into the mining framework. The
theoretical upper bound on information gain is used to facilitate a branch-and-bound
search, which prunes the search space significantly. Experimental results show that
DDPMine achieves orders of magnitude speedup over the two-step approach without
decline in classification accuracy. DDPMine also outperforms state-of-the-art associative
classification methods in terms of both accuracy and efficiency

You might also like