use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.
the class KMeansHybridLloydMacQueenTest method testKMeansHybridLloydMacQueen.
/**
* Run KMeans with fixed parameters and compare the result to a golden
* standard.
*/
@Test
public void testKMeansHybridLloydMacQueen() {
Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
Clustering<?> result = //
new ELKIBuilder<KMeansHybridLloydMacQueen<DoubleVector>>(KMeansHybridLloydMacQueen.class).with(KMeans.K_ID, //
5).with(KMeans.SEED_ID, //
7).build().run(db);
testFMeasure(db, result, 0.998005);
testClusterSizes(result, new int[] { 199, 200, 200, 200, 201 });
}
use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.
the class KMeansMacQueenTest method testKMeansMacQueen.
/**
* Run KMeans with fixed parameters and compare the result to a golden
* standard.
*/
@Test
public void testKMeansMacQueen() {
Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
Clustering<?> result = //
new ELKIBuilder<KMeansMacQueen<DoubleVector>>(KMeansMacQueen.class).with(KMeans.K_ID, //
5).with(KMeans.SEED_ID, //
7).build().run(db);
testFMeasure(db, result, 0.998005);
testClusterSizes(result, new int[] { 199, 200, 200, 200, 201 });
}
use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.
the class KMeansSortTest method testKMeansSort.
/**
* Run KMeans with fixed parameters and compare the result to a golden
* standard.
*/
@Test
public void testKMeansSort() {
Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
Clustering<?> result = //
new ELKIBuilder<KMeansSort<DoubleVector>>(KMeansSort.class).with(KMeans.K_ID, //
5).with(KMeans.SEED_ID, //
7).build().run(db);
testFMeasure(db, result, 0.998005);
testClusterSizes(result, new int[] { 199, 200, 200, 200, 201 });
}
use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.
the class GriDBSCANTest method testGriDBSCANWide.
/**
* Run DBSCAN with fixed parameters and compare the result to a golden
* standard, with larger grid width (fewer cells, less redundancy).
*/
@Test
public void testGriDBSCANWide() {
Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
Clustering<Model> result = //
new ELKIBuilder<GriDBSCAN<DoubleVector>>(GriDBSCAN.class).with(DBSCAN.Parameterizer.EPSILON_ID, //
0.04).with(DBSCAN.Parameterizer.MINPTS_ID, //
20).with(GriDBSCAN.Parameterizer.GRID_ID, //
0.4).build().run(db);
testFMeasure(db, result, 0.996413);
testClusterSizes(result, new int[] { 29, 50, 101, 150 });
}
use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.
the class GriDBSCANTest method testGriDBSCANResults.
/**
* Run DBSCAN with fixed parameters and compare the result to a golden
* standard.
*/
@Test
public void testGriDBSCANResults() {
Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
Clustering<Model> result = //
new ELKIBuilder<GriDBSCAN<DoubleVector>>(GriDBSCAN.class).with(DBSCAN.Parameterizer.EPSILON_ID, //
0.04).with(DBSCAN.Parameterizer.MINPTS_ID, //
20).with(GriDBSCAN.Parameterizer.GRID_ID, //
0.08).build().run(db);
testFMeasure(db, result, 0.996413);
testClusterSizes(result, new int[] { 29, 50, 101, 150 });
}
Aggregations