Skip to main content

PCY implementation in association rule mining

Project description

PCY implementation

forthebadge made-with-python
Python 3.6

Example

test.py

from pcy_algo import pcy_algo
num_transactions = pd.read_csv("path/to/dataset")
hash_func_size = 40 
support = 500 # 5 percentage
confidence = 30

num_transactions containes baskets with items encoded as integers

  • num_transactions = [[12,1,2,3,4],[2,3,49,45,12],[12,98,45,22]]

unique_items contains distinct elements.

  • unique_items = (12,1,2,3,4,49,45,98,22)

create object

basket = pcy_algo(num_transactions,unique_items,hash_func_size,support,confidence)
result = basket.mine_data()

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

pcy_algo-0.0.2.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

pcy_algo-0.0.2-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

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