https://github.com/christian-stephen/apriori-algorithm
Python implementation of the Apriori algorithm for association rule mining.
https://github.com/christian-stephen/apriori-algorithm
apriori-algorithm python
Last synced: 4 months ago
JSON representation
Python implementation of the Apriori algorithm for association rule mining.
- Host: GitHub
- URL: https://github.com/christian-stephen/apriori-algorithm
- Owner: christian-stephen
- License: mit
- Created: 2017-04-26T18:37:11.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-02T19:31:19.000Z (over 7 years ago)
- Last Synced: 2025-01-14T20:25:01.967Z (5 months ago)
- Topics: apriori-algorithm, python
- Language: Python
- Size: 18.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python Implementation of the Apriori Algorithm
The code is a Python implementation of the Apriori algorithm for association rule mining.
## Usage
To run the program on a Unix-based system, extract the files to a directory and type the following:
```
$ Python2 apriori.py
```
When prompted, enter a data file (e.g., "sample_data") with the following format: the first line contains column headings (i.e., attribute names) and every following row contains the values that represent a tuple. Then, enter support and confidence values (i.e., values between 0 and 1). The resulting association rules are saved to the "Rules" file.Here is a sample run:
```
Enter data file name: sample_dataEnter minimum support value [0.0-1.0]: 0.5
Enter minimum confidence value [0.0-1.0]: 0.7
Apriori algorithm finished.
Total processing time: 0.007 seconds.
Association rules saved in the file "Rules."
```## License
The MIT License (MIT)