FPGrowth 算法的 Java 实现用法如下:

创建一个 jar 并运行它:


git clone git@github.com:relekang/fpgrowth.git && cd fpgrowth

mvn assembly:assembly

java -jar target/FPGrowth-jar-with-dependencies.jar <path> <minimum>

</minimum></path>

或者在代码中使用它:


double minSupport = 0.9;

boolean pruneTreeOnInsert = true;

Map<integer, integer=""> oneItemsetCounts = FPGrowth.getOneItemsetCounts(transactions);

List<frequentitemset> frequentItemsets = FPGrowth.runFPGrowth(transactions, minSupport, pruneTreeOnInsert);

</frequentitemset></integer,>

以上是 FPGrowth 算法的基本实现和使用方法,适用于在 Java 项目中执行频繁项集挖掘任务。