use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.
the class MiniMaxAnderbergTest method testMiniMax.
// TODO: add more data sets.
/**
* Run agglomerative hierarchical clustering with fixed parameters and compare
* the result to a golden standard.
*/
@Test
public void testMiniMax() {
Database db = makeSimpleDatabase(UNITTEST + "single-link-effect.ascii", 638);
Clustering<?> clustering = //
new ELKIBuilder<>(CutDendrogramByNumberOfClusters.class).with(CutDendrogramByNumberOfClusters.Parameterizer.MINCLUSTERS_ID, //
3).with(AbstractAlgorithm.ALGORITHM_ID, //
MiniMaxAnderberg.class).build().run(db);
testFMeasure(db, clustering, 0.938662648);
testClusterSizes(clustering, new int[] { 200, 211, 227 });
}
use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.
the class MiniMaxTest method testMiniMax.
// TODO: add more data sets.
/**
* Run agglomerative hierarchical clustering with fixed parameters and compare
* the result to a golden standard.
*/
@Test
public void testMiniMax() {
Database db = makeSimpleDatabase(UNITTEST + "single-link-effect.ascii", 638);
Clustering<?> clustering = //
new ELKIBuilder<>(CutDendrogramByNumberOfClusters.class).with(CutDendrogramByNumberOfClusters.Parameterizer.MINCLUSTERS_ID, //
3).with(AbstractAlgorithm.ALGORITHM_ID, //
MiniMax.class).build().run(db);
testFMeasure(db, clustering, 0.938662648);
testClusterSizes(clustering, new int[] { 200, 211, 227 });
}
use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.
the class MiniMaxTest method testMiniMax2.
/**
* Run agglomerative hierarchical clustering with fixed parameters and compare
* the result to a golden standard.
*/
@Test
public void testMiniMax2() {
Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
Clustering<?> clustering = //
new ELKIBuilder<>(CutDendrogramByNumberOfClusters.class).with(CutDendrogramByNumberOfClusters.Parameterizer.MINCLUSTERS_ID, //
3).with(AbstractAlgorithm.ALGORITHM_ID, //
MiniMax.class).build().run(db);
testFMeasure(db, clustering, 0.914592130);
testClusterSizes(clustering, new int[] { 59, 112, 159 });
}
use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.
the class SLINKHDBSCANLinearMemoryTest method testHDBSCAN.
// TODO: add more data sets.
/**
* Run agglomerative hierarchical clustering with fixed parameters and compare
* the result to a golden standard.
*/
@Test
public void testHDBSCAN() {
Database db = makeSimpleDatabase(UNITTEST + "single-link-effect.ascii", 638);
Clustering<?> clustering = //
new ELKIBuilder<>(CutDendrogramByNumberOfClusters.class).with(CutDendrogramByNumberOfClusters.Parameterizer.MINCLUSTERS_ID, //
3).with(AbstractAlgorithm.ALGORITHM_ID, //
SLINKHDBSCANLinearMemory.class).with(SLINKHDBSCANLinearMemory.Parameterizer.MIN_PTS_ID, //
20).build().run(db);
testFMeasure(db, clustering, 0.686953412);
testClusterSizes(clustering, new int[] { 1, 200, 437 });
}
use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.
the class BIRCHLeafClusteringTest method testCentroidManhattan.
@Test
public void testCentroidManhattan() {
Database db = makeSimpleDatabase(UNITTEST + "single-link-effect.ascii", 638);
Clustering<?> clustering = //
new ELKIBuilder<>(BIRCHLeafClustering.class).with(CFTree.Factory.Parameterizer.DISTANCE_ID, // d3
CentroidManhattanDistance.class).with(CFTree.Factory.Parameterizer.ABSORPTION_ID, //
DiameterCriterion.class).with(CFTree.Factory.Parameterizer.MAXLEAVES_ID, //
4).build().run(db);
testFMeasure(db, clustering, 0.92236);
testClusterSizes(clustering, new int[] { 83, 154, 200, 201 });
}
Aggregations