데이터과학 삼학년

[Association rule (연관규칙)] Support, Confidence, Lift, Interest-Support, Cross-Support 본문

Recommendation System

[Association rule (연관규칙)] Support, Confidence, Lift, Interest-Support, Cross-Support

Dan-k 2020. 6. 18. 16:00
반응형

연관분석에서 주요 지표인

Support, Confidence, Lift에 대해 알아보자.

연관규칙은 비지도학습으로서, Y값에 대한 label이 없는 상태에서 데이터에 숨겨진 패턴을 찾는 분석기법
Y값에 대한 label을 가지고 하는 지도학습인 예측이나 분류에서 하는 모델 성과평가와 Y값 label 없이 숨겨진 패턴을 찾는 연관규칙의 흥미척도는 성격이 다름

 

만약 물건 A, B를 산다고 가정하면.

 

  • Support (지지도)

전체 상품 구입 수 중 A 라는 상품이 구입된 수

 

  • Confidence (신뢰도)

A를 구입한 사람 중에 A와 B를 같이 구매한 수

 

  • Lift (향상도)

두 상품의 관계를 직접적으로 나타내는 것으로

값이 1보다 크면 A를 샀을때 B를 살 확률이 높은 것을 의미하고,

값이 1미만이면 A를 샀을때 B를 사지 않을 확률이 높은 것을 의미한다.

 

 

(1) 특정 지지도(Support) 와 신뢰도(Confidence) 이하의 rule 은 screening out 시키게끔 해놓고,

(minimun support, minimum confidence)

 

(2) 향상도(Lift) 내림차순(양의 관계를 찾을 때)으로 sorting을 해서 rule을 평가하는 식으로 이용

 

그리고 관심이 있는 상품이나 item이 있으면 목적에 맞게 해당 item이 left-hand side 나 right-hand side 에 있는 rule만을 subset으로 선별해서 보기도 함

 

 

 

지지도(support), 신뢰도(confidence), 향상도(lift)의 한계를 보완하기 위한 다양한 평가척도가 더 있는데요, 그 중에서도 IS(Interest-Support) 측도, 교차지지도(cross support) 이다

 

 

  •  IS(Interest-Support) 측도 : 향상도(lift)와 지지도(support)의 곱에 제곱근을 취한 값

향상도(lift)와 지지도(support)가 모두 높을 수록 IS 측도값도 커짐. 둘 중에 하나라도 작으면 IS측도는 작아지며, 지지도는 낮고 향상도만 높은 rule이나 향상도는 낮고 지지도만 높은 rule을 screening out 시키고 둘다 높은 rule만 선별할 수 있음.

 

 

  • 교차지지도(cross support) : 최대지지도에 대한 최소지지도의 비율

항목집합 

 

에 대하여 의미 없는 연관규칙의 생성을 방지하기 위하여 교차지지도 r(X)를 이용함.  분자에 지지도 중에서 최소값을, 분모에는 지지도 중에서 최대값을 가져다가 계산을 하므로 지지도의 최소값과 최대값의 차이가 클 수록 교차지지도는 낮아지게 되며, 이 비율이 매우 작으면 항목집합 X에서 생성되는 연관규칙이 의미가 없을 가능성이 높음.

 

 


출처: https://rfriend.tistory.com/191

 

[R 연관규칙(Association Rule)] 지지도(support), 신뢰도(confidence), 향상도(lift), IS측도, 교차지지도

지난번 포스팅에서는 연관규칙분석, 장바구니분석, 순차분석의 개략적인 정의와 활용에 대해서 알아보았습니다. 이번 포스팅에서는 연관규칙(association rule)의 흥미를 평가할 수 있는 척도(intere

rfriend.tistory.com

 


Measure 1: Support. This says how popular an itemset is, as measured by the proportion of transactions in which an itemset appears. In Table 1 below, the support of {apple} is 4 out of 8, or 50%. Itemsets can also contain multiple items. For instance, the support of {apple, beer, rice} is 2 out of 8, or 25%.


Table 1. Example Transactions

If you discover that sales of items beyond a certain proportion tend to have a significant impact on your profits, you might consider using that proportion as your support threshold. You may then identify itemsets with support values above this threshold as significant itemsets.

Measure 2: Confidence. This says how likely item Y is purchased when item X is purchased, expressed as {X -> Y}. This is measured by the proportion of transactions with item X, in which item Y also appears. In Table 1, the confidence of {apple -> beer} is 3 out of 4, or 75%.

 

 

One drawback of the confidence measure is that it might misrepresent the importance of an association. This is because it only accounts for how popular apples are, but not beers. If beers are also very popular in general, there will be a higher chance that a transaction containing apples will also contain beers, thus inflating the confidence measure. To account for the base popularity of both constituent items, we use a third measure called lift.

 

Measure 3: Lift. This says how likely item Y is purchased when item X is purchased, while controlling for how popular item Y is. In Table 1, the lift of {apple -> beer} is 1,which implies no association between items. A lift value greater than 1 means that item Y is likely to be bought if item X is bought, while a value less than 1 means that item Y is unlikely to be bought if item X is bought.

 

 

 

 

출처 : https://www.kdnuggets.com/2016/04/association-rules-apriori-algorithm-tutorial.html

 

Association Rules and the Apriori Algorithm: A Tutorial - KDnuggets

A great and clearly-presented tutorial on the concepts of association rules and the Apriori algorithm, and their roles in market basket analysis.

www.kdnuggets.com

 

728x90
반응형
LIST
Comments