fptree

fun fptree(minSupport: Int, supplier: Supplier<Stream<IntArray>>): FPTree

Builds a FP-tree.

Return

the FP-tree.

Parameters

supplier

the lambda to retrun a stream of item set database. Each item set may have different length. The item identifiers have to be in [0, n), where n is the number of items. Item set should NOT contain duplicated items. Note that it is reordered after the call.

minSupport

the required minimum support of item sets in terms of frequency.