use of de.lmu.ifi.dbs.elki.result.AssociationRuleResult in project elki by elki-project.
the class LiftTest method testToyExample.
@Test
public void testToyExample() {
Database db = loadTransactions(UNITTEST + "itemsets/increasing5.txt", 5);
AssociationRuleResult res = //
new ELKIBuilder<>(AssociationRuleGeneration.class).with(FPGrowth.Parameterizer.MINSUPP_ID, //
2).with(AssociationRuleGeneration.Parameterizer.MINMEASURE_ID, //
1.5).with(AssociationRuleGeneration.Parameterizer.INTERESTMEASURE_ID, //
Lift.class).build().run(db);
assertEquals("Size not as expected.", 18, res.getRules().size());
}
use of de.lmu.ifi.dbs.elki.result.AssociationRuleResult in project elki by elki-project.
the class AddedValueTest method testToyExample.
@Test
public void testToyExample() {
Database db = loadTransactions(UNITTEST + "itemsets/increasing5.txt", 5);
AssociationRuleResult res = //
new ELKIBuilder<>(AssociationRuleGeneration.class).with(FPGrowth.Parameterizer.MINSUPP_ID, //
1).with(AssociationRuleGeneration.Parameterizer.MINMEASURE_ID, //
0.6).with(AssociationRuleGeneration.Parameterizer.INTERESTMEASURE_ID, //
AddedValue.class).build().run(db);
assertEquals("Size not as expected.", 27, res.getRules().size());
}
use of de.lmu.ifi.dbs.elki.result.AssociationRuleResult in project elki by elki-project.
the class CertaintyFactorTest method testToyExample.
@Test
public void testToyExample() {
Database db = loadTransactions(UNITTEST + "itemsets/increasing5.txt", 5);
AssociationRuleResult res = //
new ELKIBuilder<>(AssociationRuleGeneration.class).with(FPGrowth.Parameterizer.MINSUPP_ID, //
2).with(AssociationRuleGeneration.Parameterizer.MINMEASURE_ID, //
1.).with(AssociationRuleGeneration.Parameterizer.INTERESTMEASURE_ID, //
CertaintyFactor.class).build().run(db);
assertEquals("Size not as expected.", 18, res.getRules().size());
}
use of de.lmu.ifi.dbs.elki.result.AssociationRuleResult in project elki by elki-project.
the class GiniIndexTest method testToyExample.
@Test
public void testToyExample() {
Database db = loadTransactions(UNITTEST + "itemsets/increasing5.txt", 5);
AssociationRuleResult res = //
new ELKIBuilder<>(AssociationRuleGeneration.class).with(FPGrowth.Parameterizer.MINSUPP_ID, //
1).with(AssociationRuleGeneration.Parameterizer.MINMEASURE_ID, //
0.2).with(AssociationRuleGeneration.Parameterizer.INTERESTMEASURE_ID, //
GiniIndex.class).build().run(db);
assertEquals("Size not as expected.", 18, res.getRules().size());
}
use of de.lmu.ifi.dbs.elki.result.AssociationRuleResult in project elki by elki-project.
the class ConvictionTest method testToyExample.
@Test
public void testToyExample() {
Database db = loadTransactions(UNITTEST + "itemsets/increasing5.txt", 5);
AssociationRuleResult res = //
new ELKIBuilder<>(AssociationRuleGeneration.class).with(FPGrowth.Parameterizer.MINSUPP_ID, //
2).with(AssociationRuleGeneration.Parameterizer.MINMEASURE_ID, //
1.5).with(AssociationRuleGeneration.Parameterizer.INTERESTMEASURE_ID, //
Conviction.class).build().run(db);
assertEquals("Size not as expected.", 12, res.getRules().size());
}
Aggregations