Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

chonyy/fpgrowth_py

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to use

Install the Pypi package using pip

pip install fpgrowth_py

Then use it like

from fpgrowth_py import fpgrowth
itemSetList = [['eggs', 'bacon', 'soup'],
                ['eggs', 'bacon', 'apple'],
                ['soup', 'bacon', 'banana']]
freqItemSet, rules = fpgrowth(itemSetList, minSupRatio=0.5, minConf=0.5)
print(freqItemSet)
print(rules)  
# [[{'beer'}, {'rice'}, 0.6666666666666666], [{'rice'}, {'beer'}, 1.0]]
# rules[0] --> rules[1], confidence = rules[2]

Clone the repo

Get a copy of this repo using git clone

git clone https://github.com/chonyy/fpgrowth_py.git

Run the program with dataset provided and default values for minSupport = 0.5 and minConfidence = 0.5

python fpgrowth.py -f dataset.csv

Run program with dataset and min support and min confidence

python fpgrowth.py -f tesco2.csv -s 0.5 -c 0.5
Morty Proxy This is a proxified and sanitized view of the page, visit original site.