Association rule mining via FPGrowth in Rust
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Build Status

An implementation of association rule mining via the FPGrowth algorithm in Rust.

This finds relationships of the form "people who buy X also buy Y", and also determines the strengths (confidence, lift, support) of those relationships.

This implementation parallelizes FPGrowth using the Rayon Rust crate.

For an overview of assocation rule mining, see Chapter 5 of Introduction to Data Mining, Kumar et al: Association Analysis: Basic Concepts and Algorithms.

To build, install Rust from, then to build run:

cargo build --release

To run:

cargo run --release -- $ARGS

For example:

cargo run --release -- \
    --input datasets/kosarak.csv \
    --output rules.txt \
    --min-support 0.05 \
    --min-confidence 0.05 \
    --min-lift 5

Input files are in CSV format, that is, one transaction of items per line, items separated by commas.

To run tests:

cargo test

Auto-format code via:

cargo fmt