Search in sources :

Example 16 with Database

use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.

the class BIRCHLeafClusteringTest method testAverageIntracluster.

@Test
public void testAverageIntracluster() {
    Database db = makeSimpleDatabase(UNITTEST + "single-link-effect.ascii", 638);
    Clustering<?> clustering = // 
    new ELKIBuilder<>(BIRCHLeafClustering.class).with(CFTree.Factory.Parameterizer.DISTANCE_ID, // 
    AverageIntraclusterDistance.class).with(CFTree.Factory.Parameterizer.ABSORPTION_ID, // 
    DiameterCriterion.class).with(CFTree.Factory.Parameterizer.MAXLEAVES_ID, // 
    4).build().run(db);
    testFMeasure(db, clustering, 0.82023);
    testClusterSizes(clustering, new int[] { 158, 224, 256 });
}
Also used : Database(de.lmu.ifi.dbs.elki.database.Database) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Example 17 with Database

use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.

the class CutDendrogramByHeightTest method testSLINKResults.

@Test
public void testSLINKResults() {
    Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
    Clustering<?> clustering = // 
    new ELKIBuilder<>(CutDendrogramByHeight.class).with(CutDendrogramByHeight.Parameterizer.THRESHOLD_ID, // 
    0.14).with(AbstractAlgorithm.ALGORITHM_ID, // 
    SLINK.class).build().run(db);
    testFMeasure(db, clustering, 0.9474250948);
    testClusterSizes(clustering, new int[] { 1, 1, 1, 1, 1, 2, 3, 62, 104, 154 });
}
Also used : ELKIBuilder(de.lmu.ifi.dbs.elki.utilities.ELKIBuilder) Database(de.lmu.ifi.dbs.elki.database.Database) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Example 18 with Database

use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.

the class HDBSCANHierarchyExtractionTest method testSLINKResults.

@Test
public void testSLINKResults() {
    Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
    HDBSCANHierarchyExtraction slink = // 
    new ELKIBuilder<>(HDBSCANHierarchyExtraction.class).with(HDBSCANHierarchyExtraction.Parameterizer.MINCLUSTERSIZE_ID, // 
    50).with(AbstractAlgorithm.ALGORITHM_ID, // 
    SLINK.class).build();
    testFMeasure(db, slink.run(db), 0.9407684);
    testClusterSizes(slink.run(db), new int[] { 8, 62, 104, 156 });
}
Also used : Database(de.lmu.ifi.dbs.elki.database.Database) SLINK(de.lmu.ifi.dbs.elki.algorithm.clustering.hierarchical.SLINK) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Example 19 with Database

use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.

the class HDBSCANHierarchyExtractionTest method testMiniMaxNNResults.

@Test
public void testMiniMaxNNResults() {
    Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
    HDBSCANHierarchyExtraction slink = // 
    new ELKIBuilder<>(HDBSCANHierarchyExtraction.class).with(HDBSCANHierarchyExtraction.Parameterizer.MINCLUSTERSIZE_ID, // 
    50).with(AbstractAlgorithm.ALGORITHM_ID, // 
    MiniMaxNNChain.class).build();
    testFMeasure(db, slink.run(db), 0.91459);
    testClusterSizes(slink.run(db), new int[] { 0, 59, 112, 159 });
}
Also used : Database(de.lmu.ifi.dbs.elki.database.Database) MiniMaxNNChain(de.lmu.ifi.dbs.elki.algorithm.clustering.hierarchical.MiniMaxNNChain) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Example 20 with Database

use of de.lmu.ifi.dbs.elki.database.Database in project elki by elki-project.

the class HDBSCANHierarchyExtractionTest method testHDBSCANResults.

@Test
public void testHDBSCANResults() {
    Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
    HDBSCANHierarchyExtraction slink = // 
    new ELKIBuilder<>(HDBSCANHierarchyExtraction.class).with(HDBSCANHierarchyExtraction.Parameterizer.MINCLUSTERSIZE_ID, // 
    50).with(AbstractAlgorithm.ALGORITHM_ID, // 
    HDBSCANLinearMemory.class).with(HDBSCANLinearMemory.Parameterizer.MIN_PTS_ID, // 
    20).build();
    testFMeasure(db, slink.run(db), 0.97218);
    testClusterSizes(slink.run(db), new int[] { 21, 54, 103, 152 });
}
Also used : ELKIBuilder(de.lmu.ifi.dbs.elki.utilities.ELKIBuilder) Database(de.lmu.ifi.dbs.elki.database.Database) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Aggregations

Database (de.lmu.ifi.dbs.elki.database.Database)288 Test (org.junit.Test)240 AbstractClusterAlgorithmTest (de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest)151 ELKIBuilder (de.lmu.ifi.dbs.elki.utilities.ELKIBuilder)102 DoubleVector (de.lmu.ifi.dbs.elki.data.DoubleVector)85 OutlierResult (de.lmu.ifi.dbs.elki.result.outlier.OutlierResult)69 AbstractOutlierAlgorithmTest (de.lmu.ifi.dbs.elki.algorithm.outlier.AbstractOutlierAlgorithmTest)50 Model (de.lmu.ifi.dbs.elki.data.model.Model)29 CutDendrogramByNumberOfClusters (de.lmu.ifi.dbs.elki.algorithm.clustering.hierarchical.extraction.CutDendrogramByNumberOfClusters)26 Clustering (de.lmu.ifi.dbs.elki.data.Clustering)14 StaticArrayDatabase (de.lmu.ifi.dbs.elki.database.StaticArrayDatabase)11 AbstractFrequentItemsetAlgorithmTest (de.lmu.ifi.dbs.elki.algorithm.itemsetmining.AbstractFrequentItemsetAlgorithmTest)10 AssociationRuleGeneration (de.lmu.ifi.dbs.elki.algorithm.itemsetmining.associationrules.AssociationRuleGeneration)10 AssociationRuleResult (de.lmu.ifi.dbs.elki.result.AssociationRuleResult)10 ListParameterization (de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization)10 AbstractSimpleAlgorithmTest (de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest)9 MedoidModel (de.lmu.ifi.dbs.elki.data.model.MedoidModel)9 DBIDIter (de.lmu.ifi.dbs.elki.database.ids.DBIDIter)9 NumberVector (de.lmu.ifi.dbs.elki.data.NumberVector)8 DBIDs (de.lmu.ifi.dbs.elki.database.ids.DBIDs)8