use of de.lmu.ifi.dbs.elki.utilities.ELKIBuilder in project elki by elki-project.
the class GeneralizedDBSCANTest method testDBSCANResults.
/**
* Run Generalized DBSCAN with fixed parameters and compare the result to a
* golden standard.
*/
@Test
public void testDBSCANResults() {
Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
Clustering<Model> result = //
new ELKIBuilder<>(GeneralizedDBSCAN.class).with(DBSCAN.Parameterizer.EPSILON_ID, //
0.04).with(DBSCAN.Parameterizer.MINPTS_ID, //
20).build().run(db);
testFMeasure(db, result, 0.996413);
testClusterSizes(result, new int[] { 29, 50, 101, 150 });
}
use of de.lmu.ifi.dbs.elki.utilities.ELKIBuilder in project elki by elki-project.
the class ParallelGeneralizedDBSCANTest method testDBSCANOnSingleLinkDataset.
/**
* Run Generalized DBSCAN with fixed parameters and compare the result to a
* golden standard.
*/
@Test
public void testDBSCANOnSingleLinkDataset() {
Database db = makeSimpleDatabase(UNITTEST + "single-link-effect.ascii", 638);
Clustering<Model> result = //
new ELKIBuilder<>(ParallelGeneralizedDBSCAN.class).with(DBSCAN.Parameterizer.EPSILON_ID, //
11.5).with(DBSCAN.Parameterizer.MINPTS_ID, //
120).build().run(db);
testFMeasure(db, result, 0.954382);
testClusterSizes(result, new int[] { 11, 200, 203, 224 });
}
use of de.lmu.ifi.dbs.elki.utilities.ELKIBuilder in project elki by elki-project.
the class KMeansLloydTest method testKMeansLloyd.
/**
* Run KMeans with fixed parameters and compare the result to a golden
* standard.
*/
@Test
public void testKMeansLloyd() {
Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
Clustering<?> result = //
new ELKIBuilder<KMeansLloyd<DoubleVector>>(KMeansLloyd.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.utilities.ELKIBuilder in project elki by elki-project.
the class KMeansMinusMinusTest method testKMeansMinusMinusOutlier.
@Test
public void testKMeansMinusMinusOutlier() {
Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
Clustering<?> result = //
new ELKIBuilder<KMeansMinusMinus<DoubleVector>>(KMeansMinusMinus.class).with(KMeans.K_ID, //
5).with(KMeans.SEED_ID, //
7).with(KMeansMinusMinus.Parameterizer.RATE_ID, //
0.1).with(//
KMeansMinusMinus.Parameterizer.NOISE_FLAG_ID).build().run(db);
testFMeasure(db, result, 0.92674);
testClusterSizes(result, new int[] { 100, 115, 185, 200, 200, 200 });
}
use of de.lmu.ifi.dbs.elki.utilities.ELKIBuilder in project elki by elki-project.
the class KMediansLloydTest method testKMediansLloyd.
/**
* Run KMedians with fixed parameters and compare the result to a golden
* standard.
*/
@Test
public void testKMediansLloyd() {
Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
Clustering<?> result = //
new ELKIBuilder<KMediansLloyd<DoubleVector>>(KMediansLloyd.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 });
}
Aggregations