1 / 18

Mining Frequent patterns without candidate generation

Mining Frequent patterns without candidate generation. Jiawei Han, Jian Pei and Yiwen Yin. Abdullah Mueen. Problem : Mining Frequent Pattern. I={a 1 , a 1 , …, a m } is a set of items .

alka
Download Presentation

Mining Frequent patterns without candidate generation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mining Frequent patterns without candidate generation Jiawei Han, Jian Pei and Yiwen Yin Abdullah Mueen

  2. Problem : Mining Frequent Pattern • I={a1, a1, …, am} is a set of items. • DB={T1, T1, …, Tn}is the database of transactions where each transaction is a non empty subset of I. • A pattern is also a subset of I. • A pattern is frequent if it is contained in (supported by) more than a fixed number (ξ) of transactions.

  3. Previous work : Apriori It may need to generate a huge number of candidate itemsets. To discover a frequent pattern of size k it needs to generate more than 2k candidates in total. It may need to scan the database repeatedly and check for the frequencies of the candidates.

  4. FP-growth FP-growth mines frequent patterns without generating the candidate sets. It grows the patterns from fragments. It builds an extended prefix tree (FP-tree) for the transaction database. This tree is a compressed representation of the database. It saves repeated scan of the database.

  5. FP-tree root Minimum support (ξ) = 3 f:4 c:1 c:3 b:1 b:1 a:3 p:1 sorted in descending order of the freq. m:2 b:1 p:2 m:1

  6. Conditional FP-tree of p root Minimum support (ξ) = 3 c:3 Conditional FP-tree of p Conditional pattern base for p The set of frequent patterns containing p is { cp , p } {p }

  7. Frequent patterns containing m root root root Conditional pattern base for am Conditional pattern base for m f:3 f:3 f:3 Conditional FP-tree of m root root c:3 c:3 c:3 root f:3 f:3 a:3 a:3 a:3 f:3 c:3 c:3 Conditional FP-tree of cam Conditional FP-tree of am The set of frequent patterns containing m is pattern base for cam { m, am, cam, fcam, fam, cm, fcm } { m, am, cam, fcam, fam, cm, fcm, fm } { m, am, cam, fcam, fam} { m, am } { m } { m, am, cam, fcam } { m, am, cam }

  8. Complete Frequent Pattern set Generated by conditional FP tree of mwhich is a single Path root • A single path generates each combination of its nodes as frequent pattern • Supports for a pattern is equal to the minimum support of a node in it. f:3 fcam c:3 fca fcm fam cam a:3 fc fa fm ca cm am ap f c a m p b

  9. Pseudocode • Procedure FP-growth(Tree,α) • ifTree contains a single path P • for each combination (β) of the nodes in P • Generate pattern βUα with support = minimum support of a node in β • else • for each ai in the header of Tree do • Generate pattern β= αUaiwith support = ai.support. • Construct β’s conditional pattern base and conditional FP-treeTreeβ • ifTreeβ ≠ Ø • CallFP-growth(Treeβ, β)

  10. Implementation issues For different support thresholds (ξ) there are different FP-trees. We may chose ξ=20 if 98% of the queries have ξ≥20. Updating the FP-tree after each new transaction may be costly. We may count the occurrence frequency of every items and update the tree if relative frequency of an item gets a large change.

  11. New Challenges FP-growth may output a large number of frequent patterns for small (ξ) and very small number of frequent patterns for large (ξ). We may not know the (ξ) for our purpose. Which frequent patterns are good instances for generating interesting association rules?

  12. Top-K frequent closed patterns fcam:3 fca:3 fcm:3 fam:3 cam:3 fc:4 fa:3 fm:3 ca:3 cm:3 am:3 ap:3 fp:3 fb:3 f:5 c:4 a:3 m:3 p:3 b:3 • We can also specify the minimum length of the patterns. • Top-2 frequent closed patterns with length ≥ 2 is fc and fcam Closed pattern is a pattern whose support is larger than any of its super pattern.

  13. Mining Top-K closed FP The algorithm starts with an FP-tree having 0 support threshold. While building the tree, it prunes the smaller patterns with length < min_length. After the tree is built, it prunes the relatively infrequent patterns by raising the support threshold. Mining is performed on the final pruned FP-tree.

  14. Compressed Frequent Pattern fcam fca fcm fam cam {fcam, cam, ap, b} fc fa fm ca cm am ap f c a m p b FP-growth may end up with a large set of patterns. We can compress the set of frequent patterns by clustering it minimally and selecting a representative pattern from each cluster.

  15. Clustering Criterion For each cluster there must be a representative pattern Pr . D(P,Pr ) ≤ δ for all patterns inside the cluster of Pr . D(P1,P2 ) = 1- |T(P1)∩T(P2)| |T(P1)UT(P2)| T(P) is the set of transactions that support P. D is a metric for closed patterns.

  16. Summary FP-tree is an extended prefix tree that summarizes the database in a compressed form. FP-growth is an algorithm for mining frequent patterns using FP-tree. FP-tree can also be used to mine Top-K frequent closed patterns and Compressed frequent patterns.

  17. References • Mining Frequent Patterns without Candidate Generation • Jiawei Han, Jian Pei and Yiwen Yin • Mining Top-K Frequent Closed Patterns without Minimum Support • Jiawei Han, Jianyong Wang, Ying Lu and Petre Tzetkov • Mining Compressed Frequent-Pattern Sets • Dong Xin, Jiawei Han, Xipheng Yan and Hong Cheng

  18. Thank You

More Related