Search in sources :

Example 81 with Database

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

the class PROCLUSTest method testPROCLUSResults.

/**
 * Run PROCLUS with fixed parameters and compare the result to a golden
 * standard.
 */
@Test
public void testPROCLUSResults() {
    Database db = makeSimpleDatabase(UNITTEST + "subspace-simple.csv", 600);
    Clustering<?> result = // 
    new ELKIBuilder<PROCLUS<DoubleVector>>(PROCLUS.class).with(PROCLUS.Parameterizer.L_ID, // 
    1).with(PROCLUS.Parameterizer.K_ID, // 
    4).with(PROCLUS.Parameterizer.SEED_ID, // 
    12).build().run(db);
    testFMeasure(db, result, 0.88499877);
    testClusterSizes(result, new int[] { 22, 36, 200, 342 });
}
Also used : Database(de.lmu.ifi.dbs.elki.database.Database) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Example 82 with Database

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

the class PROCLUSTest method testPROCLUSSubspaceOverlapping.

/**
 * Run PROCLUS with fixed parameters and compare the result to a golden
 * standard.
 */
@Test
public void testPROCLUSSubspaceOverlapping() {
    Database db = makeSimpleDatabase(UNITTEST + "subspace-overlapping-3-4d.ascii", 850);
    Clustering<?> result = // 
    new ELKIBuilder<PROCLUS<DoubleVector>>(PROCLUS.class).with(PROCLUS.Parameterizer.L_ID, // 
    2).with(PROCLUS.Parameterizer.K_ID, // 
    3).with(PROCLUS.Parameterizer.SEED_ID, // 
    3).build().run(db);
    testFMeasure(db, result, 0.96985144);
    testClusterSizes(result, new int[] { 150, 288, 412 });
}
Also used : Database(de.lmu.ifi.dbs.elki.database.Database) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Example 83 with Database

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

the class SUBCLUTest method testSUBCLUResults.

/**
 * Run SUBCLU with fixed parameters and compare the result to a golden
 * standard.
 */
@Test
public void testSUBCLUResults() {
    Database db = makeSimpleDatabase(UNITTEST + "subspace-simple.csv", 600);
    Clustering<SubspaceModel> result = // 
    new ELKIBuilder<SUBCLU<DoubleVector>>(SUBCLU.class).with(SUBCLU.EPSILON_ID, // 
    0.001).with(SUBCLU.MINPTS_ID, // 
    100).build().run(db);
    // PairCounting is not appropriate here: overlapping clusterings!
    // testFMeasure(db, result, 0.9090);
    testClusterSizes(result, new int[] { 191, 194, 395 });
}
Also used : ELKIBuilder(de.lmu.ifi.dbs.elki.utilities.ELKIBuilder) Database(de.lmu.ifi.dbs.elki.database.Database) SubspaceModel(de.lmu.ifi.dbs.elki.data.model.SubspaceModel) DoubleVector(de.lmu.ifi.dbs.elki.data.DoubleVector) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Example 84 with Database

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

the class SUBCLUTest method testSUBCLUSubspaceOverlapping.

/**
 * Run SUBCLU with fixed parameters and compare the result to a golden
 * standard.
 */
@Test
public void testSUBCLUSubspaceOverlapping() {
    Database db = makeSimpleDatabase(UNITTEST + "subspace-overlapping-3-4d.ascii", 850);
    Clustering<SubspaceModel> result = // 
    new ELKIBuilder<SUBCLU<DoubleVector>>(SUBCLU.class).with(SUBCLU.EPSILON_ID, // 
    0.04).with(SUBCLU.MINPTS_ID, // 
    70).build().run(db);
    // PairCounting is not appropriate here: overlapping clusterings!
    // testFMeasure(db, result, 0.49279033);
    testClusterSizes(result, new int[] { 99, 247, 303, 323, 437, 459 });
}
Also used : ELKIBuilder(de.lmu.ifi.dbs.elki.utilities.ELKIBuilder) Database(de.lmu.ifi.dbs.elki.database.Database) SubspaceModel(de.lmu.ifi.dbs.elki.data.model.SubspaceModel) DoubleVector(de.lmu.ifi.dbs.elki.data.DoubleVector) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Example 85 with Database

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

the class KMeansPlusPlusInitialMeansTest method testSingleAssignmentKMeansPlusPlus.

/**
 * Run KMeans with fixed parameters and compare the result to a golden
 * standard.
 */
@Test
public void testSingleAssignmentKMeansPlusPlus() {
    Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
    Clustering<?> result = // 
    new ELKIBuilder<SingleAssignmentKMeans<DoubleVector>>(SingleAssignmentKMeans.class).with(KMeans.K_ID, // 
    5).with(KMeans.SEED_ID, // 
    3).with(KMeans.INIT_ID, // 
    KMeansPlusPlusInitialMeans.class).build().run(db);
    testFMeasure(db, result, 0.99800500);
    testClusterSizes(result, new int[] { 199, 200, 200, 200, 201 });
}
Also used : SingleAssignmentKMeans(de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.SingleAssignmentKMeans) 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