Search in sources :

Example 6 with Model

use of de.lmu.ifi.dbs.elki.data.model.Model in project elki by elki-project.

the class FourCTest method testFourCResults.

/**
 * Run 4C with fixed parameters and compare the result to a golden standard.
 */
@Test
public void testFourCResults() {
    Database db = makeSimpleDatabase(UNITTEST + "hierarchical-3d2d1d.csv", 600);
    Clustering<Model> result = // 
    new ELKIBuilder<FourC<DoubleVector>>(FourC.class).with(DBSCAN.Parameterizer.EPSILON_ID, // 
    0.30).with(DBSCAN.Parameterizer.MINPTS_ID, // 
    50).with(LimitEigenPairFilter.Parameterizer.EIGENPAIR_FILTER_DELTA, // 
    0.5).with(FourC.Settings.Parameterizer.LAMBDA_ID, // 
    1).build().run(db);
    testFMeasure(db, result, 0.7052);
    testClusterSizes(result, new int[] { 218, 382 });
}
Also used : ELKIBuilder(de.lmu.ifi.dbs.elki.utilities.ELKIBuilder) Database(de.lmu.ifi.dbs.elki.database.Database) Model(de.lmu.ifi.dbs.elki.data.model.Model) DoubleVector(de.lmu.ifi.dbs.elki.data.DoubleVector) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Example 7 with Model

use of de.lmu.ifi.dbs.elki.data.model.Model in project elki by elki-project.

the class ORCLUSTest method testORCLUSSkewedDisjoint.

/**
 * Run ORCLUS with fixed parameters and compare the result to a golden
 * standard.
 */
@Test
public void testORCLUSSkewedDisjoint() {
    Database db = makeSimpleDatabase(UNITTEST + "correlation-skewed-disjoint-3-5d.ascii", 601);
    Clustering<Model> result = // 
    new ELKIBuilder<ORCLUS<DoubleVector>>(ORCLUS.class).with(ORCLUS.Parameterizer.K_ID, // 
    3).with(ORCLUS.Parameterizer.L_ID, // 
    4).with(ORCLUS.Parameterizer.SEED_ID, // 
    0).build().run(db);
    testFMeasure(db, result, 0.848054);
    testClusterSizes(result, new int[] { 189, 200, 212 });
}
Also used : Database(de.lmu.ifi.dbs.elki.database.Database) Model(de.lmu.ifi.dbs.elki.data.model.Model) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Example 8 with Model

use of de.lmu.ifi.dbs.elki.data.model.Model in project elki by elki-project.

the class GeneralizedDBSCANTest 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<>(GeneralizedDBSCAN.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 });
}
Also used : ELKIBuilder(de.lmu.ifi.dbs.elki.utilities.ELKIBuilder) Database(de.lmu.ifi.dbs.elki.database.Database) Model(de.lmu.ifi.dbs.elki.data.model.Model) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Example 9 with Model

use of de.lmu.ifi.dbs.elki.data.model.Model in project elki by elki-project.

the class ParallelGeneralizedDBSCANTest method testParallelDBSCANResults.

/**
 * Run Generalized DBSCAN with fixed parameters and compare the result to a
 * golden standard.
 */
@Test
public void testParallelDBSCANResults() {
    Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
    Clustering<Model> result = // 
    new ELKIBuilder<>(ParallelGeneralizedDBSCAN.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 });
}
Also used : ELKIBuilder(de.lmu.ifi.dbs.elki.utilities.ELKIBuilder) Database(de.lmu.ifi.dbs.elki.database.Database) Model(de.lmu.ifi.dbs.elki.data.model.Model) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Example 10 with Model

use of de.lmu.ifi.dbs.elki.data.model.Model in project elki by elki-project.

the class LMCLUSTest method testLMCLUSOverlap.

/**
 * Run LMCLUS with fixed parameters and compare the result to a golden standard.
 */
@Test
public void testLMCLUSOverlap() {
    Database db = makeSimpleDatabase(UNITTEST + "correlation-overlap-3-5d.ascii", 650);
    Clustering<Model> result = // 
    new ELKIBuilder<>(LMCLUS.class).with(LMCLUS.Parameterizer.MINSIZE_ID, // 
    100).with(LMCLUS.Parameterizer.THRESHOLD_ID, // 
    10).with(LMCLUS.Parameterizer.RANDOM_ID, // 
    0).build().run(db);
    testClusterSizes(result, new int[] { 200, 201, 249 });
    testFMeasure(db, result, 0.921865);
}
Also used : Database(de.lmu.ifi.dbs.elki.database.Database) Model(de.lmu.ifi.dbs.elki.data.model.Model) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Aggregations

Model (de.lmu.ifi.dbs.elki.data.model.Model)60 Database (de.lmu.ifi.dbs.elki.database.Database)29 Test (org.junit.Test)24 Clustering (de.lmu.ifi.dbs.elki.data.Clustering)21 Cluster (de.lmu.ifi.dbs.elki.data.Cluster)18 AbstractClusterAlgorithmTest (de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest)17 ClusterModel (de.lmu.ifi.dbs.elki.data.model.ClusterModel)13 ModifiableDBIDs (de.lmu.ifi.dbs.elki.database.ids.ModifiableDBIDs)12 ELKIBuilder (de.lmu.ifi.dbs.elki.utilities.ELKIBuilder)11 DBIDs (de.lmu.ifi.dbs.elki.database.ids.DBIDs)10 ArrayList (java.util.ArrayList)9 DoubleVector (de.lmu.ifi.dbs.elki.data.DoubleVector)8 DBIDIter (de.lmu.ifi.dbs.elki.database.ids.DBIDIter)8 AbortException (de.lmu.ifi.dbs.elki.utilities.exceptions.AbortException)8 FiniteProgress (de.lmu.ifi.dbs.elki.logging.progress.FiniteProgress)7 HashMap (java.util.HashMap)5 ByLabelClustering (de.lmu.ifi.dbs.elki.algorithm.clustering.trivial.ByLabelClustering)3 SubspaceModel (de.lmu.ifi.dbs.elki.data.model.SubspaceModel)3 IndefiniteProgress (de.lmu.ifi.dbs.elki.logging.progress.IndefiniteProgress)3 CorePredicate (de.lmu.ifi.dbs.elki.algorithm.clustering.gdbscan.CorePredicate)2