use of de.lmu.ifi.dbs.elki.data.model.MedoidModel 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.data.model.MedoidModel 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.data.model.MedoidModel in project elki by elki-project.
the class KMedoidsPAMReynoldsTest method testKMedoidsPAM.
/**
* Run KMedians PAM with fixed parameters and compare the result to a golden
* standard.
*/
@Test
public void testKMedoidsPAM() {
Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
Clustering<MedoidModel> result = //
new ELKIBuilder<KMedoidsPAMReynolds<DoubleVector>>(KMedoidsPAMReynolds.class).with(KMeans.K_ID, //
5).build().run(db);
testFMeasure(db, result, 0.998005);
testClusterSizes(result, new int[] { 199, 200, 200, 200, 201 });
}
use of de.lmu.ifi.dbs.elki.data.model.MedoidModel in project elki by elki-project.
the class KMedoidsPAMTest method testKMedoidsPAM.
/**
* Run KMedians PAM with fixed parameters and compare the result to a golden
* standard.
*/
@Test
public void testKMedoidsPAM() {
Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
Clustering<MedoidModel> result = //
new ELKIBuilder<KMedoidsPAM<DoubleVector>>(KMedoidsPAM.class).with(KMeans.K_ID, //
5).build().run(db);
testFMeasure(db, result, 0.998005);
testClusterSizes(result, new int[] { 199, 200, 200, 200, 201 });
}
Aggregations