Search in sources :

Example 56 with ELKIBuilder

use of de.lmu.ifi.dbs.elki.utilities.ELKIBuilder in project elki by elki-project.

the class ReferenceBasedOutlierDetectionTest method testReferenceBasedOutlierDetectionAxis.

@Test
public void testReferenceBasedOutlierDetectionAxis() {
    Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
    OutlierResult result = // 
    new ELKIBuilder<>(ReferenceBasedOutlierDetection.class).with(ReferenceBasedOutlierDetection.Parameterizer.K_ID, // 
    11).with(ReferenceBasedOutlierDetection.Parameterizer.REFP_ID, // 
    AxisBasedReferencePoints.class).build().run(db);
    testAUC(db, "Noise", result, 0.858953703);
    testSingleScore(result, 945, 0.9193032738);
}
Also used : ELKIBuilder(de.lmu.ifi.dbs.elki.utilities.ELKIBuilder) Database(de.lmu.ifi.dbs.elki.database.Database) OutlierResult(de.lmu.ifi.dbs.elki.result.outlier.OutlierResult) Test(org.junit.Test) AbstractOutlierAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.outlier.AbstractOutlierAlgorithmTest)

Example 57 with ELKIBuilder

use of de.lmu.ifi.dbs.elki.utilities.ELKIBuilder in project elki by elki-project.

the class ReferenceBasedOutlierDetectionTest method testReferenceBasedOutlierDetectionGenerated.

@Test
public void testReferenceBasedOutlierDetectionGenerated() {
    Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
    OutlierResult result = // 
    new ELKIBuilder<>(ReferenceBasedOutlierDetection.class).with(ReferenceBasedOutlierDetection.Parameterizer.K_ID, // 
    11).with(ReferenceBasedOutlierDetection.Parameterizer.REFP_ID, // 
    RandomGeneratedReferencePoints.class).with(RandomGeneratedReferencePoints.Parameterizer.N_ID, // 
    15).with(RandomGeneratedReferencePoints.Parameterizer.RANDOM_ID, // 
    0).build().run(db);
    testAUC(db, "Noise", result, 0.878203703);
    testSingleScore(result, 945, 0.910430564);
}
Also used : ELKIBuilder(de.lmu.ifi.dbs.elki.utilities.ELKIBuilder) Database(de.lmu.ifi.dbs.elki.database.Database) OutlierResult(de.lmu.ifi.dbs.elki.result.outlier.OutlierResult) Test(org.junit.Test) AbstractOutlierAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.outlier.AbstractOutlierAlgorithmTest)

Example 58 with ELKIBuilder

use of de.lmu.ifi.dbs.elki.utilities.ELKIBuilder in project elki by elki-project.

the class ALOCITest method testALOCI.

@Test
public void testALOCI() {
    Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
    OutlierResult result = // 
    new ELKIBuilder<ALOCI<DoubleVector>>(ALOCI.class).with(ALOCI.Parameterizer.SEED_ID, // 
    2).with(ALOCI.Parameterizer.GRIDS_ID, // 
    3).build().run(db);
    testAUC(db, "Noise", result, 0.7622222);
    testSingleScore(result, 146, 1.1305337);
}
Also used : ELKIBuilder(de.lmu.ifi.dbs.elki.utilities.ELKIBuilder) Database(de.lmu.ifi.dbs.elki.database.Database) OutlierResult(de.lmu.ifi.dbs.elki.result.outlier.OutlierResult) DoubleVector(de.lmu.ifi.dbs.elki.data.DoubleVector) Test(org.junit.Test) AbstractOutlierAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.outlier.AbstractOutlierAlgorithmTest)

Example 59 with ELKIBuilder

use of de.lmu.ifi.dbs.elki.utilities.ELKIBuilder in project elki by elki-project.

the class LDFTest method testLDF.

@Test
public void testLDF() {
    Database db = makeSimpleDatabase(UNITTEST + "outlier-axis-subspaces-6d.ascii", 1345);
    OutlierResult result = // 
    new ELKIBuilder<LDF<DoubleVector>>(LDF.class).with(LDF.Parameterizer.K_ID, // 
    10).with(LDF.Parameterizer.H_ID, // 
    1).build().run(db);
    testSingleScore(result, 1293, 3.158819);
    testAUC(db, "Noise", result, 0.9127619);
}
Also used : ELKIBuilder(de.lmu.ifi.dbs.elki.utilities.ELKIBuilder) Database(de.lmu.ifi.dbs.elki.database.Database) OutlierResult(de.lmu.ifi.dbs.elki.result.outlier.OutlierResult) DoubleVector(de.lmu.ifi.dbs.elki.data.DoubleVector) Test(org.junit.Test) AbstractOutlierAlgorithmTest(de.lmu.ifi.dbs.elki.algorithm.outlier.AbstractOutlierAlgorithmTest)

Example 60 with ELKIBuilder

use of de.lmu.ifi.dbs.elki.utilities.ELKIBuilder in project elki by elki-project.

the class DBSCANTest 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<DBSCAN<DoubleVector>>(DBSCAN.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) DoubleVector(de.lmu.ifi.dbs.elki.data.DoubleVector) Test(org.junit.Test)

Aggregations

ELKIBuilder (de.lmu.ifi.dbs.elki.utilities.ELKIBuilder)114 Test (org.junit.Test)111 Database (de.lmu.ifi.dbs.elki.database.Database)102 DoubleVector (de.lmu.ifi.dbs.elki.data.DoubleVector)75 AbstractClusterAlgorithmTest (de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest)73 OutlierResult (de.lmu.ifi.dbs.elki.result.outlier.OutlierResult)26 AbstractOutlierAlgorithmTest (de.lmu.ifi.dbs.elki.algorithm.outlier.AbstractOutlierAlgorithmTest)22 Model (de.lmu.ifi.dbs.elki.data.model.Model)11 AbstractDataSourceTest (de.lmu.ifi.dbs.elki.datasource.AbstractDataSourceTest)10 MultipleObjectsBundle (de.lmu.ifi.dbs.elki.datasource.bundle.MultipleObjectsBundle)10 MedoidModel (de.lmu.ifi.dbs.elki.data.model.MedoidModel)7 SubspaceModel (de.lmu.ifi.dbs.elki.data.model.SubspaceModel)5 InputStreamDatabaseConnection (de.lmu.ifi.dbs.elki.datasource.InputStreamDatabaseConnection)3 WeightedCovarianceMatrixBuilder (de.lmu.ifi.dbs.elki.math.linearalgebra.pca.WeightedCovarianceMatrixBuilder)3 InputStream (java.io.InputStream)3 CorrelationModel (de.lmu.ifi.dbs.elki.data.model.CorrelationModel)2 PercentageEigenPairFilter (de.lmu.ifi.dbs.elki.math.linearalgebra.pca.filter.PercentageEigenPairFilter)2 KolmogorovSmirnovTest (de.lmu.ifi.dbs.elki.math.statistics.tests.KolmogorovSmirnovTest)2 WelchTTest (de.lmu.ifi.dbs.elki.math.statistics.tests.WelchTTest)2 ArrayList (java.util.ArrayList)2