This repository contains a command-line application written in Dart that uncovers the association rules within a list of transactions.
cd ..
dart pub global activate apriori -s=path
You need to prepare two files:
- A JSON file containing your transactions
- A JSON file containing your settings and preferences
type Transactions = string[][];
type Options = {
transactionsPath: string;
rulesPath: string;
minSupport: number;
minConfidence: number;
maxAntecedentsLength: number;
};
You can run the application using the following command:
apriori options.json
[
["tropical fruit", "yogurt", "coffee"],
["whole milk"],
["pip fruit", "yogurt", "cream cheese", "meat spreads"]
]
{
"transactionsPath": "transactions.json",
"rulesPath": "rules.json",
"minSupport": 0.006,
"minConfidence": 0.07
}
apriori options.json
You can look at example/
for more information.
This application can extract and learn the association rules within the
transactions at example/
in ~55 seconds.