项目作者: alextanhongpin

项目描述 :
Study on different approach on data mining techniques, specifically affinity analysis such as FP-Growth, Apriori and Eclat
高级语言: Jupyter Notebook
项目地址: git://github.com/alextanhongpin/affinity-analysis.git
创建时间: 2017-12-30T15:02:33Z
项目社区:https://github.com/alextanhongpin/affinity-analysis

开源协议:

下载


FP-Growth

  1. Calculate the support count of each item in S
  2. Sort items in decreasing support counts
  3. Read transaction n

if has overlapping prefix:

  1. Increment the frequency count for each overlapped item
  2. Create new nodes for none overlapped items
  3. Set the frequency count to one

else:

  1. Create new nodes labelled with the items in t
  2. Set the frequency count to 1
  3. Create pointers to common items

Repeat until there are not more items.

Additional a FP-Tree uses pointers connecting between nodes that have the same items creating a singly linked list.

These pointers are used to access individual items in the tree much faster.

Best Scenario

There is only a single node, because all transactions have the same set of items.

Worst case

Multiple nodes where every transaction has a unique set of items.

Other solution

https://github.com/alextanhongpin/machine-learning-in-action/blob/master/fp_growth.ipynb

Reference