frequent-itemset
v1.0.5
Published
Use Apriori algorithm to calculate frequent itemset from a list of arrarys
Downloads
10
Maintainers
Readme
Frequent Itemset
Give a array of item sets and a minimum support, return you back a array of maximum frequent itemset.
This lib is implemented in Apriori algorithm.
Install
npm i frequent-itemset
Usage
- Parameters
- Array of itemsets
- Support number
- Include/Exclude support number
const fi = require('frequent-itemset');
console.log(fi(
[
['4', '5', '3'],
['1', '2', '3'],
['4', '6', '3'],
['4', '5', '3', '1', '2']
],
0.5,
true
));
// [ [ '4', '5', '3' ], [ '3', '1', '2' ] ]
License
MIT