public static Stream<AssociationRule> apply(double confidence, FPTree tree) {
        TotalSupportTree ttree = new TotalSupportTree(tree);
        ARM arm = new ARM(confidence, ttree);
        return StreamSupport.stream(arm.spliterator(), false);
    }
@Test
    public void testKosarak() {
        System.out.println("kosarak");

        FPTree tree = FPTree.of(0.003, ()-> ItemSetTestData.read("transaction/kosarak.dat"));
        Stream<AssociationRule> rules = ARM.apply(0.5, tree);
        assertEquals(17954, rules.count());
    }