Search in sources :

Example 1 with Database

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

the class EMTest method testEMMLETwoPass.

@Test
public void testEMMLETwoPass() {
    Database db = makeSimpleDatabase(UNITTEST + "hierarchical-2d.ascii", 710);
    Clustering<?> result = // 
    new ELKIBuilder<EM<DoubleVector, ?>>(EM.class).with(KMeans.SEED_ID, // 
    0).with(EM.Parameterizer.K_ID, // 
    6).with(EM.Parameterizer.INIT_ID, // 
    TwoPassMultivariateGaussianModelFactory.class).build().run(db);
    testFMeasure(db, result, 0.967410486);
    testClusterSizes(result, new int[] { 3, 5, 91, 98, 200, 313 });
}
Also used : Database(de.lmu.ifi.dbs.elki.database.Database) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Example 2 with Database

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

the class EMTest method testEMMLEDiagonal.

@Test
public void testEMMLEDiagonal() {
    Database db = makeSimpleDatabase(UNITTEST + "hierarchical-2d.ascii", 710);
    Clustering<?> result = // 
    new ELKIBuilder<EM<DoubleVector, ?>>(EM.class).with(KMeans.SEED_ID, // 
    3).with(EM.Parameterizer.K_ID, // 
    5).with(EM.Parameterizer.INIT_ID, // 
    DiagonalGaussianModelFactory.class).build().run(db);
    testFMeasure(db, result, 0.9681384);
    testClusterSizes(result, new int[] { 7, 91, 99, 200, 313 });
}
Also used : Database(de.lmu.ifi.dbs.elki.database.Database) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Example 3 with Database

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

the class EMTest method testEMMAPMultivariate.

@Test
public void testEMMAPMultivariate() {
    Database db = makeSimpleDatabase(UNITTEST + "hierarchical-2d.ascii", 710);
    Clustering<?> result = // 
    new ELKIBuilder<EM<DoubleVector, ?>>(EM.class).with(KMeans.SEED_ID, // 
    0).with(EM.Parameterizer.PRIOR_ID, // 
    10).with(EM.Parameterizer.K_ID, // 
    5).build().run(db);
    testFMeasure(db, result, 0.958843);
    testClusterSizes(result, new int[] { 3, 95, 97, 202, 313 });
}
Also used : Database(de.lmu.ifi.dbs.elki.database.Database) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Example 4 with Database

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

the class EMTest method testEMMLETextbook.

@Test
public void testEMMLETextbook() {
    Database db = makeSimpleDatabase(UNITTEST + "hierarchical-2d.ascii", 710);
    Clustering<?> result = // 
    new ELKIBuilder<EM<DoubleVector, ?>>(EM.class).with(KMeans.SEED_ID, // 
    0).with(EM.Parameterizer.K_ID, // 
    6).with(EM.Parameterizer.INIT_ID, // 
    TextbookMultivariateGaussianModelFactory.class).build().run(db);
    testFMeasure(db, result, 0.967410486);
    testClusterSizes(result, new int[] { 3, 5, 91, 98, 200, 313 });
}
Also used : Database(de.lmu.ifi.dbs.elki.database.Database) AbstractClusterAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest) Test(org.junit.Test)

Example 5 with Database

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

the class EMTest method testEMMLEMultivariate.

@Test
public void testEMMLEMultivariate() {
    Database db = makeSimpleDatabase(UNITTEST + "hierarchical-2d.ascii", 710);
    Clustering<?> result = // 
    new ELKIBuilder<EM<DoubleVector, ?>>(EM.class).with(KMeans.SEED_ID, // 
    0).with(EM.Parameterizer.K_ID, // 
    6).build().run(db);
    testFMeasure(db, result, 0.967410486);
    testClusterSizes(result, new int[] { 3, 5, 91, 98, 200, 313 });
}
Also used : ELKIBuilder(de.lmu.ifi.dbs.elki.utilities.ELKIBuilder) Database(de.lmu.ifi.dbs.elki.database.Database) DoubleVector(de.lmu.ifi.dbs.elki.data.DoubleVector) 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