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
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
Hashes for itpminer-0.0.6-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a01fe1a8cc59ae68ac249631c40c13f393ab2231877f644be014fe61d996a55 |
|
MD5 | 225668e5fbdc018bc218a5f6584c2d25 |
|
BLAKE2b-256 | b4e4cf2637ce70ed26952823be21fef9d321cc95d75521948b9dcff349b4594b |