Frequent Patterns
- itemset : A set of one or more items
- k-itemset : A itemset contains k items X= {x1, x2, ... , xk}
k 개의 아이템을 포함한 아이템셋
- (absolute) support, or support count, or frequency or occurence frequency of an itemset X: the number of transacion
that contain the itemset
- (relative) Support, s, is the fraction of transactions that contains X (i.e., the probability that a transaction contains X)
An itemset X is frequent if X's support is no less than a 'minsup' threshold
- Find all the rules X → Y with minimum support and confidence
1) support, s, probability that a transaction contains X∩Y, P(X∩Y).
2) confidence, c, conditional probability that a transaction contains Y, P(Y|X) = P(X∩Y)/P(X)

ex) 위의 그림을 살펴보면 Tid (Transaction ID) : 거래번호, 각각의 매매과정을 나타내고, 옆에는 구매내역을 나타낸다.
- absolute support 는 X 를 포함한 거래가 몇번 일어났는지 나타낸다.
예를 들어 sup(Beer, Diaper) = 3, 맥주와 기저귀를 동시에 구매한 횟수는 3이다.
- relative support 는 X 를 포함한 거래가 일어날 확률을 나타낸다. relative support(Beer, Diaper) = 3/5 = 60% 이다.
absoulte support는 크게 의미 있는 것이 아니므로 간단히 support 라고 하면 relative support를 의미한다.
- 어떤 item이 frequent 하다고 표현은 해당 itemset 의 support가 minimum support 보다 같거나 클 때만 성립한다.
- min_support = 3 이라고 설정했을 경우,
Frequent pattern : {Beer} =3 , {Diaper} =4, {Nuts} =3, {Egg} =3, {Beer, Diaper} =3
ex) Rules
- {Milk, Diaper} → {Beer} (s=2/5, c=2/3)
- {Diaper} → {Milk, Beer} (s=2/5, c=2/4)
'산업공학 > Data Analytics' 카테고리의 다른 글
FP Growth (0) | 2024.03.05 |
---|---|
Apriori algorithm (0) | 2024.03.05 |
Closed Patterns and Max-Patterns (0) | 2024.03.05 |
Minkowski distance (1) | 2024.03.05 |
Data Set, attributes (0) | 2024.03.05 |