Search in sources :

Example 36 with DoubleVector

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

the class CLIQUETest method testCLIQUEResults.

/**
 * Run CLIQUE with fixed parameters and compare the result to a golden
 * standard.
 */
@Test
public void testCLIQUEResults() {
    Database db = makeSimpleDatabase(UNITTEST + "subspace-simple.csv", 600);
    Clustering<SubspaceModel> result = // 
    new ELKIBuilder<CLIQUE<DoubleVector>>(CLIQUE.class).with(CLIQUE.Parameterizer.TAU_ID, // 
    "0.1").with(CLIQUE.Parameterizer.XSI_ID, // 
    20).build().run(db);
    // PairCounting is not appropriate here: overlapping clusterings!
    // testFMeasure(db, result, 0.9882);
    testClusterSizes(result, new int[] { 200, 200, 216, 400 });
}
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 37 with DoubleVector

use of de.lmu.ifi.dbs.elki.data.DoubleVector 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 38 with DoubleVector

use of de.lmu.ifi.dbs.elki.data.DoubleVector 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 39 with DoubleVector

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

the class KMeansPlusPlusInitialMeansTest method testSingleAssignmentKMeansPlusPlusMedoids.

/**
 * Run CLARA with fixed parameters and compare the result to a golden
 * standard.
 */
@Test
public void testSingleAssignmentKMeansPlusPlusMedoids() {
    Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
    Clustering<?> result = // 
    new ELKIBuilder<CLARA<DoubleVector>>(CLARA.class).with(KMeans.K_ID, // 
    5).with(KMeans.SEED_ID, // 
    3).with(KMeans.INIT_ID, // 
    KMeansPlusPlusInitialMeans.class).with(KMeans.MAXITER_ID, // 
    1).with(CLARA.Parameterizer.SAMPLESIZE_ID, // 
    10).with(CLARA.Parameterizer.RANDOM_ID, // 
    0).build().run(db);
    testFMeasure(db, result, 0.932711);
    testClusterSizes(result, new int[] { 165, 199, 201, 201, 234 });
}
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)

Example 40 with DoubleVector

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

the class RandomlyChosenInitialMeansTest method testRandomlyChosenInitialMedoids.

/**
 * Run CLARA with fixed parameters and compare the result to a golden
 * standard.
 */
@Test
public void testRandomlyChosenInitialMedoids() {
    Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
    Clustering<?> result = // 
    new ELKIBuilder<CLARA<DoubleVector>>(CLARA.class).with(KMeans.K_ID, // 
    5).with(KMeans.SEED_ID, // 
    7).with(KMeans.INIT_ID, // 
    RandomlyChosenInitialMeans.class).with(KMeans.MAXITER_ID, // 
    1).with(CLARA.Parameterizer.SAMPLESIZE_ID, // 
    10).with(CLARA.Parameterizer.RANDOM_ID, // 
    0).build().run(db);
    testFMeasure(db, result, 0.99602);
    testClusterSizes(result, new int[] { 198, 200, 200, 200, 202 });
}
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

DoubleVector (de.lmu.ifi.dbs.elki.data.DoubleVector)147 Test (org.junit.Test)112 Database (de.lmu.ifi.dbs.elki.database.Database)85 ELKIBuilder (de.lmu.ifi.dbs.elki.utilities.ELKIBuilder)75 AbstractClusterAlgorithmTest (de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest)50 MultipleObjectsBundle (de.lmu.ifi.dbs.elki.datasource.bundle.MultipleObjectsBundle)26 AbstractDataSourceTest (de.lmu.ifi.dbs.elki.datasource.AbstractDataSourceTest)24 OutlierResult (de.lmu.ifi.dbs.elki.result.outlier.OutlierResult)22 AbstractOutlierAlgorithmTest (de.lmu.ifi.dbs.elki.algorithm.outlier.AbstractOutlierAlgorithmTest)16 ArrayList (java.util.ArrayList)14 DBIDs (de.lmu.ifi.dbs.elki.database.ids.DBIDs)12 NumberVector (de.lmu.ifi.dbs.elki.data.NumberVector)11 DBIDIter (de.lmu.ifi.dbs.elki.database.ids.DBIDIter)10 VectorFieldTypeInformation (de.lmu.ifi.dbs.elki.data.type.VectorFieldTypeInformation)9 ListParameterization (de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization)9 Random (java.util.Random)9 AbstractSimpleAlgorithmTest (de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest)8 Model (de.lmu.ifi.dbs.elki.data.model.Model)8 LinearScanDistanceKNNQuery (de.lmu.ifi.dbs.elki.database.query.knn.LinearScanDistanceKNNQuery)8 MedoidModel (de.lmu.ifi.dbs.elki.data.model.MedoidModel)7