Skip to main content

Python implementation of FP Growth algorithm

Project description

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, minSup=0.5, minConf=0.5)
# [[{'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

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

python -f dataset.csv

Run program with dataset and min support and min confidence

python -f dataset.csv -s 0.33 -c 0.77

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fpgrowth_py-1.0.0.tar.gz (4.0 kB view hashes)

Uploaded source

Built Distribution

fpgrowth_py-1.0.0-py3-none-any.whl (5.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page