Node-FPGrowth
FPGrowth Algorithm frequent itemset mining algorithm implementation in TypeScript / JavaScript.
Getting Started
Installing
This is a Node.js module available through the npm registry.
Installation is done using the npm install
command:
npm install --save node-fpgrowth
Example of use
In your TypeScript project, import and use FPGrowth
as follows. Same example with a JavaScript syntax is available here.
; ; // Execute FPGrowth with a minimum support of 40%. Algorithm is generic.; // Returns itemsets 'as soon as possible' through events.fpgrowth.on'data',; // Execute FPGrowth on a given set of transactions.fpgrowth.exectransactions .then;
Node-FPGrowth is compatible with browserify and webpack.
Alternatively, you can import/serve the browserified fpgrowth-client.js
file found in the dist
folder:
Building from source
- Clone this repository:git clone https://github.com/alexisfacques/Node-FPGrowth.gitcd Node-FPGrowth
- Install the project's dependencies with:npm install
- Compile the module's sources to executable JavaScript:npm run tsc
- This should run the example bundled with the module:npm test
- This should recreate a browserified version,
./dist/fpgrowth-client.js
, of the module:npm run browserify
License
This project is licensed under the MIT License - see the LICENSE file for details.