use of de.lmu.ifi.dbs.elki.utilities.ELKIBuilder in project elki by elki-project.
the class DBSCANTest method testDBSCANResults.
/**
* Run 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<DBSCAN<DoubleVector>>(DBSCAN.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 AffinityPropagationClusteringAlgorithmTest method testAffinityPropagationClusteringAlgorithmResults.
/**
* Run AffinityPropagationClusteringAlgorithm with fixed parameters and
* compare the result to a golden standard.
*/
@Test
public void testAffinityPropagationClusteringAlgorithmResults() {
Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
Clustering<MedoidModel> result = //
new ELKIBuilder<AffinityPropagationClusteringAlgorithm<DoubleVector>>(AffinityPropagationClusteringAlgorithm.class).build().run(db);
testFMeasure(db, result, 0.957227259);
testClusterSizes(result, new int[] { 5, 5, 7, 55, 105, 153 });
}
use of de.lmu.ifi.dbs.elki.utilities.ELKIBuilder in project elki by elki-project.
the class AffinityPropagationClusteringAlgorithmTest method testAffinityPropagationSimilarity.
/**
* Run AffinityPropagationClusteringAlgorithm with fixed parameters and
* compare the result to a golden standard.
*/
@Test
public void testAffinityPropagationSimilarity() {
Database db = makeSimpleDatabase(UNITTEST + "single-link-effect.ascii", 638);
Clustering<MedoidModel> result = //
new ELKIBuilder<AffinityPropagationClusteringAlgorithm<DoubleVector>>(AffinityPropagationClusteringAlgorithm.class).with(AffinityPropagationClusteringAlgorithm.Parameterizer.INITIALIZATION_ID, //
SimilarityBasedInitializationWithMedian.class).with(SimilarityBasedInitializationWithMedian.Parameterizer.SIMILARITY_ID, //
PolynomialKernelFunction.class).build().run(db);
testFMeasure(db, result, 0.352103);
testClusterSizes(result, new int[] { 20, 30, 32, 33, 34, 35, 36, 39, 39, 40, 43, 45, 45, 49, 49, 69 });
}
use of de.lmu.ifi.dbs.elki.utilities.ELKIBuilder in project elki by elki-project.
the class ERiCTest method testERiCResults.
/**
* Run ERiC with fixed parameters and compare the result to a golden standard.
*/
@Test
public void testERiCResults() {
Database db = makeSimpleDatabase(UNITTEST + "hierarchical-3d2d1d.csv", 600);
Clustering<CorrelationModel> result = //
new ELKIBuilder<ERiC<DoubleVector>>(ERiC.class).with(DBSCAN.Parameterizer.MINPTS_ID, //
30).with(ERiC.Parameterizer.DELTA_ID, //
0.20).with(ERiC.Parameterizer.TAU_ID, //
0.04).with(ERiC.Parameterizer.K_ID, //
50).with(PCARunner.Parameterizer.PCA_COVARIANCE_MATRIX, //
WeightedCovarianceMatrixBuilder.class).with(WeightedCovarianceMatrixBuilder.Parameterizer.WEIGHT_ID, //
ErfcWeight.class).with(EigenPairFilter.PCA_EIGENPAIR_FILTER, //
RelativeEigenPairFilter.class).with(RelativeEigenPairFilter.Parameterizer.EIGENPAIR_FILTER_RALPHA, //
1.60).build().run(db);
// Hierarchical pairs scored: 0.9204825
testFMeasure(db, result, 0.728074);
testClusterSizes(result, new int[] { 109, 188, 303 });
}
use of de.lmu.ifi.dbs.elki.utilities.ELKIBuilder in project elki by elki-project.
the class ERiCTest method testERiCOverlap.
/**
* Run ERiC with fixed parameters and compare the result to a golden standard.
*/
@Test
public void testERiCOverlap() {
Database db = makeSimpleDatabase(UNITTEST + "correlation-overlap-3-5d.ascii", 650);
Clustering<CorrelationModel> result = //
new ELKIBuilder<ERiC<DoubleVector>>(ERiC.class).with(DBSCAN.Parameterizer.MINPTS_ID, //
15).with(ERiC.Parameterizer.DELTA_ID, //
1.0).with(ERiC.Parameterizer.TAU_ID, //
1.0).with(ERiC.Parameterizer.K_ID, //
45).with(PCARunner.Parameterizer.PCA_COVARIANCE_MATRIX, //
WeightedCovarianceMatrixBuilder.class).with(WeightedCovarianceMatrixBuilder.Parameterizer.WEIGHT_ID, //
ErfcWeight.class).with(EigenPairFilter.PCA_EIGENPAIR_FILTER, //
PercentageEigenPairFilter.class).with(PercentageEigenPairFilter.Parameterizer.ALPHA_ID, //
0.6).build().run(db);
testFMeasure(db, result, 0.831136946);
testClusterSizes(result, new int[] { 29, 189, 207, 225 });
}
Aggregations