Search in sources :

Example 51 with Model

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

the class LMCLUSTest method testLMCLUSResults.

/**
 * Run LMCLUS with fixed parameters and compare the result to a golden standard.
 */
@Test
public void testLMCLUSResults() {
    Database db = makeSimpleDatabase(UNITTEST + "hierarchical-3d2d1d.csv", 600);
    Clustering<Model> result = // 
    new ELKIBuilder<>(LMCLUS.class).with(LMCLUS.Parameterizer.MINSIZE_ID, // 
    100).with(LMCLUS.Parameterizer.THRESHOLD_ID, // 
    10).with(LMCLUS.Parameterizer.RANDOM_ID, // 
    6).build().run(db);
    testFMeasure(db, result, 0.487716464);
    testClusterSizes(result, new int[] { 30, 570 });
}
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 52 with Model

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

the class LSDBCTest method testLSDBCOnSingleLinkDataset.

@Test
public void testLSDBCOnSingleLinkDataset() {
    Database db = makeSimpleDatabase(UNITTEST + "single-link-effect.ascii", 638);
    Clustering<Model> result = // 
    new ELKIBuilder<LSDBC<DoubleVector>>(LSDBC.class).with(LSDBC.Parameterizer.ALPHA_ID, // 
    0.2).with(LSDBC.Parameterizer.K_ID, // 
    120).build().run(db);
    testFMeasure(db, result, 0.95681073);
    testClusterSizes(result, new int[] { 32, 197, 203, 206 });
}
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 53 with Model

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

the class GriDBSCANTest method testDBSCANOnSingleLinkDataset.

/**
 * Run 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<GriDBSCAN<DoubleVector>>(GriDBSCAN.class).with(DBSCAN.Parameterizer.EPSILON_ID, // 
    11.5).with(DBSCAN.Parameterizer.MINPTS_ID, // 
    120).with(GriDBSCAN.Parameterizer.GRID_ID, // 
    25.).build().run(db);
    testFMeasure(db, result, 0.954382);
    testClusterSizes(result, new int[] { 11, 200, 203, 224 });
}
Also used : Database(de.lmu.ifi.dbs.elki.database.Database) Model(de.lmu.ifi.dbs.elki.data.model.Model) Test(org.junit.Test)

Example 54 with Model

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

the class FourCTest method testFourCOverlap.

/**
 * Run 4C with fixed parameters and compare the result to a golden standard.
 */
@Test
public void testFourCOverlap() {
    Database db = makeSimpleDatabase(UNITTEST + "correlation-overlap-3-5d.ascii", 650);
    Clustering<Model> result = // 
    new ELKIBuilder<FourC<DoubleVector>>(FourC.class).with(DBSCAN.Parameterizer.EPSILON_ID, // 
    3).with(DBSCAN.Parameterizer.MINPTS_ID, // 
    50).with(LimitEigenPairFilter.Parameterizer.EIGENPAIR_FILTER_DELTA, // 
    0.5).with(FourC.Settings.Parameterizer.LAMBDA_ID, // 
    3).build().run(db);
    testFMeasure(db, result, 0.9073744);
    testClusterSizes(result, new int[] { 200, 202, 248 });
}
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 55 with Model

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

the class ORCLUSTest method testORCLUSResults.

/**
 * Run ORCLUS with fixed parameters and compare the result to a golden
 * standard.
 */
@Test
public void testORCLUSResults() {
    Database db = makeSimpleDatabase(UNITTEST + "correlation-hierarchy.csv", 450);
    Clustering<Model> result = // 
    new ELKIBuilder<ORCLUS<DoubleVector>>(ORCLUS.class).with(ORCLUS.Parameterizer.K_ID, // 
    3).with(ORCLUS.Parameterizer.L_ID, // 
    1).with(ORCLUS.Parameterizer.SEED_ID, // 
    1).build().run(db);
    testFMeasure(db, result, 0.627537295);
    testClusterSizes(result, new int[] { 25, 34, 391 });
}
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