Search in sources :

Example 41 with Database

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

the class SNNClusteringTest method testSNNClusteringResults.

/**
 * Run SNNClustering with fixed parameters and compare the result to a golden
 * standard.
 */
@Test
public void testSNNClusteringResults() {
    Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d.ascii", 1200);
    Clustering<Model> result = // 
    new ELKIBuilder<SNNClustering<DoubleVector>>(SNNClustering.class).with(SNNClustering.Parameterizer.EPSILON_ID, // 
    77).with(SNNClustering.Parameterizer.MINPTS_ID, // 
    28).with(SharedNearestNeighborPreprocessor.Factory.NUMBER_OF_NEIGHBORS_ID, // 
    100).build().run(db);
    testFMeasure(db, result, 0.832371422);
    testClusterSizes(result, new int[] { 73, 228, 213, 219, 231, 236 });
}
Also used : Database(de.lmu.ifi.dbs.elki.database.Database) Model(de.lmu.ifi.dbs.elki.data.model.Model) Test(org.junit.Test)

Example 42 with Database

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

the class COPACTest method testCOPACResults.

/**
 * Run COPAC with fixed parameters and compare the result to a golden
 * standard.
 */
@Test
public void testCOPACResults() {
    Database db = makeSimpleDatabase(UNITTEST + "correlation-hierarchy.csv", 450);
    // these parameters are not picked too well - room for improvement.
    Clustering<DimensionModel> result = // 
    new ELKIBuilder<COPAC<DoubleVector>>(COPAC.class).with(DBSCAN.Parameterizer.EPSILON_ID, // 
    0.02).with(DBSCAN.Parameterizer.MINPTS_ID, // 
    50).with(COPAC.Parameterizer.K_ID, // 
    15).build().run(db);
    testFMeasure(db, result, 0.8484056);
    testClusterSizes(result, new int[] { 54, 196, 200 });
}
Also used : DimensionModel(de.lmu.ifi.dbs.elki.data.model.DimensionModel) Database(de.lmu.ifi.dbs.elki.database.Database) Test(org.junit.Test) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest)

Example 43 with Database

use of de.lmu.ifi.dbs.elki.database.Database 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 44 with Database

use of de.lmu.ifi.dbs.elki.database.Database 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 45 with Database

use of de.lmu.ifi.dbs.elki.database.Database 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)

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