Association Rules--Apriori Algorithm

1.Association Rules Outline

1.1 Goal: Provide an overview of basic Association Rule mining techniques

Association Rules Problem Overview

Large itemsets

Association Rules Algorithms

Apriori

Sampling

Partitioning

Parallel Algorithms

Comparing Techniques

Incremental Algorithms

Advanced AR Techniques

1.2 Items frequently purchased together:

      Bread=>PeanutButter

1.3 Uses:

Placement

Advertising

Sales

Coupons

1.4 Objective: increase sales and reduce costs

1.5 Association Rule Definitions

Set of items: I={I1,I2,…,Im}

Transactions: D={t1,t2, …, tn}, tjÍ I

Itemset: {Ii1,Ii2, …, Iik} Í I

Support of an itemset: Percentage of transactions whichcontain that itemset.

Large(Frequent) itemset:Itemset whose number of occurrences is above athreshold.

1.6 AssociationRules Example 

I = { Beer, Bread, Jelly, Milk,PeanutButter}; Support of {Bread,PeanutButter} is 60%

       
1.7 AssociationRule Definitions

Association Rule(AR): implication X => Y where X,Y ∈ I and X ∩ Y = ∅;

Support of AR (s) X =>Y: Percentage of transactions that contain X∪Y;

Confidence of AR(a) X => Y: Ratio of number of transactions that contain X∪Y to the number that contain X;

1.8 AssociationRules Ex (cont’d)


Algorithmto Generate ARs

       

2.1 Large Itemset Property:

Any subset of a large itemset is large.

Contra positive:

If an itemset is not large, none of its supersets are large.

      

2.2 Apriori Ex (cont’d)
      

2.3 Apriori Algorithm

C1 = Itemsets of size one in I;

Determine all large itemsets of size 1, L1;

i = 1;

Repeat

   i = i + 1;

   Ci = Apriori-Gen(Li-1);

   Count Ci to determine Li;

until no more large itemsets found;

2.4 Apriori-Gen

Generate candidates of size i+1from large itemsets of size i.

Approach used: join large itemsets of size i if they agree on i-1

May also prune candidates who havesubsets that are not large.

2.5 Apriori-Gen Example
      

2.6 Apriori-Gen Example (cont’d)

      


2.7 AprioriAdv/Disadv

Advantages:

Uses large itemset property.

Easily parallelized

Easy to implement.

Disadvantages:

Assumes transaction database ismemory resident.

Requires up to m database scans.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值