FPGrowth { public List<ItemsetWithCount> getItemsetsWithSupportCount(List<Set<Integer>> transactions, Double supportCount) { return getItemsetsWithSupportCount(transactions, null, supportCount); }  List<ItemsetWithCount> getItemsetsWithSupportRatio(List<Set<Integer>> transactions,
                                                              Double supportRatio); List<ItemsetWithCount> getItemsetsWithSupportRatio(List<Set<Integer>> transactions,
                                                              Map<Integer, Double> initialCounts,
                                                              Double supportRatio); List<ItemsetWithCount> getItemsetsWithSupportCount(List<Set<Integer>> transactions,
                                                              Double supportCount); List<ItemsetWithCount> getItemsetsWithSupportCount(List<Set<Integer>> transactions,
                                                              Map<Integer, Double> initialCounts,
                                                              Double supportCount); List<ItemsetWithCount> getItemsetsWithSupportCount(List<Set<Integer>> transactions,
                                                              Map<Integer, Double> initialCounts,
                                                              Double supportCount,
                                                              boolean printTreeDebug); List<ItemsetWithCount> getCounts(
            List<Datum> transactions,
            Map<Integer, Double> initialCounts,
            Set<Integer> targetItems,
            List<ItemsetWithCount> toCount);  }
@Test public void dupTest() { List<Set<Integer>> txns = new ArrayList<>(); txns.add(intIfy("a, c, d")); txns.add(intIfy("a, c, d, e")); txns.add(intIfy("c")); txns.add(intIfy("a")); txns.add(intIfy("a")); txns.add(intIfy("a")); txns.add(intIfy("a")); txns.add(intIfy("a")); txns.add(intIfy("b")); txns.add(intIfy("b")); txns.add(intIfy("b")); txns.add(intIfy("a, b, d")); txns.add(intIfy("a, b, e, c")); FPGrowth fp = new FPGrowth(); List<ItemsetWithCount> itemsets = fp.getItemsetsWithSupportCount(txns, null, .01 * txns.size(), true); List<Set<Integer>> apil = itemsets.stream().map(i -> i.getItems()).collect(Collectors.toList()); Set<Set<Integer>> dupdetector = new HashSet<>(); for (Set<Integer> s : apil) { if (!dupdetector.add(s)) { log.warn("DUPLICATE FPTREE SET {}", s); } } assertEquals(dupdetector.size(), itemsets.size()); }