use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.
the class BIRCHLeafClusteringTest method testAverageIntracluster.
@Test
public void testAverageIntracluster() {
Database db = makeSimpleDatabase(UNITTEST + "single-link-effect.ascii", 638);
Clustering<?> clustering = //
new ELKIBuilder<>(BIRCHLeafClustering.class).with(CFTree.Factory.Parameterizer.DISTANCE_ID, //
AverageIntraclusterDistance.class).with(CFTree.Factory.Parameterizer.ABSORPTION_ID, //
DiameterCriterion.class).with(CFTree.Factory.Parameterizer.MAXLEAVES_ID, //
4).build().run(db);
testFMeasure(db, clustering, 0.82023);
testClusterSizes(clustering, new int[] { 158, 224, 256 });
}
use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.
the class CutDendrogramByHeightTest method testSLINKResults.
@Test
public void testSLINKResults() {
Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
Clustering<?> clustering = //
new ELKIBuilder<>(CutDendrogramByHeight.class).with(CutDendrogramByHeight.Parameterizer.THRESHOLD_ID, //
0.14).with(AbstractAlgorithm.ALGORITHM_ID, //
SLINK.class).build().run(db);
testFMeasure(db, clustering, 0.9474250948);
testClusterSizes(clustering, new int[] { 1, 1, 1, 1, 1, 2, 3, 62, 104, 154 });
}
use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.
the class HDBSCANHierarchyExtractionTest method testSLINKResults.
@Test
public void testSLINKResults() {
Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
HDBSCANHierarchyExtraction slink = //
new ELKIBuilder<>(HDBSCANHierarchyExtraction.class).with(HDBSCANHierarchyExtraction.Parameterizer.MINCLUSTERSIZE_ID, //
50).with(AbstractAlgorithm.ALGORITHM_ID, //
SLINK.class).build();
testFMeasure(db, slink.run(db), 0.9407684);
testClusterSizes(slink.run(db), new int[] { 8, 62, 104, 156 });
}
use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.
the class HDBSCANHierarchyExtractionTest method testMiniMaxNNResults.
@Test
public void testMiniMaxNNResults() {
Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
HDBSCANHierarchyExtraction slink = //
new ELKIBuilder<>(HDBSCANHierarchyExtraction.class).with(HDBSCANHierarchyExtraction.Parameterizer.MINCLUSTERSIZE_ID, //
50).with(AbstractAlgorithm.ALGORITHM_ID, //
MiniMaxNNChain.class).build();
testFMeasure(db, slink.run(db), 0.91459);
testClusterSizes(slink.run(db), new int[] { 0, 59, 112, 159 });
}
use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.
the class HDBSCANHierarchyExtractionTest method testHDBSCANResults.
@Test
public void testHDBSCANResults() {
Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
HDBSCANHierarchyExtraction slink = //
new ELKIBuilder<>(HDBSCANHierarchyExtraction.class).with(HDBSCANHierarchyExtraction.Parameterizer.MINCLUSTERSIZE_ID, //
50).with(AbstractAlgorithm.ALGORITHM_ID, //
HDBSCANLinearMemory.class).with(HDBSCANLinearMemory.Parameterizer.MIN_PTS_ID, //
20).build();
testFMeasure(db, slink.run(db), 0.97218);
testClusterSizes(slink.run(db), new int[] { 21, 54, 103, 152 });
}
Aggregations