Académique Documents
Professionnel Documents
Culture Documents
Lecture’s Structure
Definition and Benefit
Method
Apriori Algorithm
Support for An Item Set
Confidence for An Association Rule
Support for An Association Rule
Extended Rule Selection
Definition
Market Basket Analysis
Find regularities in the shopping
behavior of customers of supermarkets,
mail-order companies and the like
Try to find sets of products that are
frequently bought together
The information is expressed in the
form or rule
1
Copyright © Yudi Agusta, PhD, 2006
Benefit
The rule can be used to increase the number
of items sold, for instance, by appropriately
arranging the products in the shelves of a
supermarket (they maybe placed adjacent of
each other)
The rule can be used to arrange promotion
The rule can be used to prepare the
availability of products in the selves
Association Rule
Example: If a customer buys wine and bread,
he often buys cheese, too
An association rule expresses an association
between sets of items/products
Can be applied to items/products in a:
Supermarket
mail-order company
special equipment options of a car
optional services offered by telecommunication
companies etc
Association Rule
Tidak hanya mencari hanya sekedar rule, tapi
mencari rule yang “good”, “expressive” dan
“reliable”
Standar measure of good rule: support and
confidence of a rule
Main problem: there are so many possible
rules
Example: products in a supermarket
Efficient algorithm is needed to inspect all the
possible rules
2
Copyright © Yudi Agusta, PhD, 2006
Apriori Algorithm
Developed by Agrawal et al. in 1993
Restrict the search space
Check only a subset of all rules
Try not to miss important rules
Some terms:
Support
Confidence
Item Set: a group of products such as {bread,
wine, cheese}.
Contoh
A customer buys the set X = {milk, bread,
apples, wine, sausages, cheese, onions,
potatoes}
Item Set = {bread, wine, cheese}
S is obviously a subset of X, hence S is in U
If there are 318 customers and 242 of them
buy such a set U or a similar one that
contains S, the support(S) = 76,1%
3
Copyright © Yudi Agusta, PhD, 2006
Example
Let R = “wine AND bread THEN cheese”
If a customer buys wine and bread then the
rule is applicable and it says that he/she can
be expected to buy cheese.
If he/she doesn’t buy wine or doesn’t buy
bread or buys neither, then the rule is not
applicable and it doesn’t say anything about
the customer.
The customer may or may not buy cheese,
and thus, the rule may or may not be correct.
Rule Confidence
Set a limit about how good is a rule in
predicting an event.
In the last example, a percentage of the
number of all correct prediction divided by
the number of all prediction is the rule
confidence.
In some program, the rule confidence of a
rule is set equal to 80% (to make it a good
rule)
4
Copyright © Yudi Agusta, PhD, 2006
5
Copyright © Yudi Agusta, PhD, 2006
6
Copyright © Yudi Agusta, PhD, 2006
7
Copyright © Yudi Agusta, PhD, 2006
Topik Diskusi
Apa kendala yang sering dihadapi
dalam menerapkan Association Rule?
Beberapa cara pemberian score untuk
memilih rule yang menarik sudah
dijelaskan hari ini. Kenapa pemberian
score ini begitu penting? Diskusikan
secara detail satu dari cara-cara
tersebut.