Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hawmex/apriori
Association Rule Learning with Apriori.
https://github.com/hawmex/apriori
apriori-algorithm association-rule-learning dart
Last synced: 5 days ago
JSON representation
Association Rule Learning with Apriori.
- Host: GitHub
- URL: https://github.com/hawmex/apriori
- Owner: Hawmex
- License: mit
- Created: 2021-12-29T09:32:30.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-21T20:09:10.000Z (over 1 year ago)
- Last Synced: 2024-12-19T08:13:22.679Z (16 days ago)
- Topics: apriori-algorithm, association-rule-learning, dart
- Language: Dart
- Homepage:
- Size: 2.23 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Association Rule Learning with Apriori
This repository contains a command-line application written in Dart that
uncovers the association rules within a list of transactions.## Getting Started
### Install the Application
```
cd ..
``````
dart pub global activate apriori -s=path
```### Prepare Input Files
You need to prepare two files:
- A JSON file containing your transactions
- A JSON file containing your settings and preferences#### Transactions Scheme
```ts
type Transactions = string[][];
```#### Options Scheme
```ts
type Options = {
transactionsPath: string;
rulesPath: string;
minSupport: number;
minConfidence: number;
maxAntecedentsLength: number;
};
```### Run the Application
You can run the application using the following command:
```
apriori options.json
```## Example
### `transactions.json`
```json
[
["tropical fruit", "yogurt", "coffee"],
["whole milk"],
["pip fruit", "yogurt", "cream cheese", "meat spreads"]
]
```### `options.json`
```json
{
"transactionsPath": "transactions.json",
"rulesPath": "rules.json",
"minSupport": 0.006,
"minConfidence": 0.07
}
```### Learning the Association Rules
```
apriori options.json
```You can look at [`example/`](./example/) for more information.
## Performance
This application can extract and learn the association rules within the
transactions at [`example/`](./example/) in ~55 seconds.