Python implementation of ITPMiner algorithm
Project description
Inter-Transactional Patterns Miner(itpminer)
Python implementation of ITPMiner algorithm[1]
- Free software: MIT license
Features
- Mine frequent inter-transactional items
- Generate association rules between inter-transactional items
- Generate a network graph of association rules
- Type definitions provided for mypy type checker
Installation
PIP:
pip install itpminer
Conda:
conda install -c conda-forge itpminer
Example
See also demo.ipynb or Colab Notebook. The code below is available on demo.py.
# Import itpminer and create a dummy database of inter transactions
from itpminer.utils import association_rules, rules_graph
from itpminer import itp_miner
database = [
["a", "b"],
["a", "c", "d"],
["a"],
["a", "b", "c", "d"],
["a", "b", "d"],
["a", "d"]
]
# Mine frequent inter-transactional patterns
tree_dict, frequent_patterns_dict, frequent_patterns_list, frequent_patterns_dataframe = itp_miner(
database=database)
# Derive association rules from frequent patterns
rules_dict, rules_display_dict, rules_dataframe = association_rules(
tree_dict=tree_dict)
# Plot a network graph between extended items
rules_graph(rules_display_dict=rules_display_dict, rules_dict=rules_dict)
Credits
This package was created with Cookiecutter and the giswqs/pypackage project template.
References
[1] Anthony J.T. Lee, Chun-Sheng Wang, An efficient algorithm for mining frequent inter-transaction patterns, Information Sciences, Volume 177, Issue 17, 2007, Pages 3453-3476, ISSN 0020-0255, https://doi.org/10.1016/j.ins.2007.03.007. (https://www.sciencedirect.com/science/article/pii/S002002550700151X) Keywords: Association rules; Data mining; Inter-transaction patterns
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file itpminer-0.0.12.tar.gz
.
File metadata
- Download URL: itpminer-0.0.12.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5901bbee36f5970c31599ac6b9b4832c9d47e77cc710a838fd4eae0b2aae9049 |
|
MD5 | f8b513e8edee09340e22de10e63439b9 |
|
BLAKE2b-256 | b73b23e6c2a9ee2b6fbcce9189e21c4655235532c1a009ecc0195031efefb275 |
File details
Details for the file itpminer-0.0.12-py2.py3-none-any.whl
.
File metadata
- Download URL: itpminer-0.0.12-py2.py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34d5e48077133e51e062a37cbfced4eb04170ec00dbc72a78043272627436e9b |
|
MD5 | 75d6485c486b0e04f16ae500b2f75f9c |
|
BLAKE2b-256 | ec42cd902e73f5638ce2f3ca90f1ef26070e524795d50c573f5603578bebf327 |