Search in sources :

Example 86 with ELKIBuilder

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

the class HilOutTest method testHilOut.

@Test
public void testHilOut() {
    Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
    OutlierResult result = // 
    new ELKIBuilder<HilOut<DoubleVector>>(HilOut.class).with(HilOut.Parameterizer.K_ID, // 
    4).with(HilOut.Parameterizer.N_ID, // 
    200).build().run(db);
    testAUC(db, "Noise", result, 0.985398148);
    testSingleScore(result, 945, 1.70927657);
}
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 87 with ELKIBuilder

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

the class OnlineLOFTest method getDatabase.

/**
 * Returns the database.
 */
private static UpdatableDatabase getDatabase() {
    UpdatableDatabase db = // 
    new ELKIBuilder<>(HashmapDatabase.class).with(FileBasedDatabaseConnection.Parameterizer.INPUT_ID, // 
    dataset).build();
    db.initialize();
    return db;
}
Also used : UpdatableDatabase(de.lmu.ifi.dbs.elki.database.UpdatableDatabase) ELKIBuilder(de.lmu.ifi.dbs.elki.utilities.ELKIBuilder)

Example 88 with ELKIBuilder

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

the class IDOSTest method testToyExample.

@Test
public void testToyExample() {
    Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
    OutlierResult result = // 
    new ELKIBuilder<IDOS<DoubleVector>>(IDOS.class).with(IDOS.Parameterizer.KC_ID, // 
    100).with(IDOS.Parameterizer.KR_ID, // 
    20).build().run(db);
    testAUC(db, "Noise", result, 0.9194814);
    testSingleScore(result, 945, 1.130819);
}
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 89 with ELKIBuilder

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

the class INFLOTest method testINFLOPruning.

@Test
public void testINFLOPruning() {
    Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
    OutlierResult result = // 
    new ELKIBuilder<INFLO<DoubleVector>>(INFLO.class).with(INFLO.Parameterizer.M_ID, // 
    0.5).with(INFLO.Parameterizer.K_ID, 30).build().run(db);
    testAUC(db, "Noise", result, 0.94130555);
    // Not pruned.
    testSingleScore(result, 945, 1.3285178);
    result = // 
    new ELKIBuilder<INFLO<DoubleVector>>(INFLO.class).with(INFLO.Parameterizer.M_ID, // 
    0.2).with(INFLO.Parameterizer.K_ID, 30).build().run(db);
    testAUC(db, "Noise", result, 0.8198611111);
    // Pruned.
    testSingleScore(result, 945, 1.0);
}
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 90 with ELKIBuilder

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

the class COPTest method testCOPRobust.

@Test
public void testCOPRobust() {
    Database db = makeSimpleDatabase(UNITTEST + "outlier-parabolic.ascii", 530);
    OutlierResult result = // 
    new ELKIBuilder<COP<DoubleVector>>(COP.class).with(COP.Parameterizer.K_ID, // 
    30).with(COP.Parameterizer.PCARUNNER_ID, // 
    AutotuningPCA.class).with(AutotuningPCA.Parameterizer.PCA_COVARIANCE_MATRIX, // 
    WeightedCovarianceMatrixBuilder.class).with(WeightedCovarianceMatrixBuilder.Parameterizer.WEIGHT_ID, // 
    ErfcWeight.class).build().run(db);
    testAUC(db, "Noise", result, 0.90166666);
    testSingleScore(result, 416, 0.25705955);
}
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) WeightedCovarianceMatrixBuilder(de.lmu.ifi.dbs.elki.math.linearalgebra.pca.WeightedCovarianceMatrixBuilder) 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