Apyori
Apyori is a simple implementation of Apriori algorithm with Python 2.7 and 3.3 - 3.5, provided as APIs and as commandline interfaces.
Module Features
Consisted of only one file and depends on no other libraries, which enable you to use it portably.
Able to used as APIs.
Application Features
Supports a JSON output format.
Supports a TSV output format for 2-items relations.
Installation
Choose one from the following.
Put apyori.py into your project.
Run
python setup.py install.
API Usage
Here is a basic example:
from apyori import apriori
transactions = [
['beer', 'nuts'],
['beer', 'cheese'],
]
results = list(apriori(transactions))
For more details, see apyori.apriori pydoc.
CLI Usage
First, prepare input data as tab-separated transactions.
Each item is separated with a tab.
Each transactions is separated with a line feed code.
Second, run the application. Input data is given as a standard input or file paths.
Run with
python apyori.pycommand.If installed, you can also run with
apyori-runcommand.
For more details, use ‘-h’ option.
Samples
Basic usage
apyori-run < data/integration_test_input_1.tsv
Use TSV output
apyori-run -f tsv < data/integration_test_input_1.tsv
Fields of output mean:
Base item.
Appended item.
Support.
Confidence.
Lift.
Specify the minimum support
apyori-run -s 0.5 < data/integration_test_input_1.tsv
Specify the minimum confidence
apyori-run -c 0.5 < data/integration_test_input_1.tsv
Metadata
Release files for apyori 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| apyori-1.1.2.tar.gz | 8.6 kB | Without provenance | Details for apyori-1.1.2.tar.gz |
Release files / apyori-1.1.2.tar.gz
| Download URL | apyori-1.1.2.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2e6ffcf14732b1b1432608cf83b81ac538243387b0458eb7d9296e770d462ec
|
|
BLAKE2b-256 checksum How to use checksums |
5e625ffde5c473ea4b033490617ec5caa80d59804875ad3c3c57c0976533a21a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|
Security for apyori 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.