Search in sources :

Example 51 with ELKIBuilder

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

the class COPTest method testCOPRANSAC.

@Test
public void testCOPRANSAC() {
    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_EIGENPAIR_FILTER, // 
    PercentageEigenPairFilter.class).with(AutotuningPCA.Parameterizer.PCA_COVARIANCE_MATRIX, // 
    RANSACCovarianceMatrixBuilder.class).with(RANSACCovarianceMatrixBuilder.Parameterizer.ITER_ID, // 
    25).with(RANSACCovarianceMatrixBuilder.Parameterizer.SEED_ID, // 
    0).build().run(db);
    testAUC(db, "Noise", result, 0.89526);
    testSingleScore(result, 416, 0.382879);
}
Also used : PercentageEigenPairFilter(de.lmu.ifi.dbs.elki.math.linearalgebra.pca.filter.PercentageEigenPairFilter) 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)

Example 52 with ELKIBuilder

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

the class ABODTest method testABOD.

@Test
public void testABOD() {
    Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
    OutlierResult result = new ELKIBuilder<ABOD<DoubleVector>>(ABOD.class).build().run(db);
    testAUC(db, "Noise", result, 0.9297962962962);
    testSingleScore(result, 945, 2.0897348547799E-5);
}
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 53 with ELKIBuilder

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

the class ReferenceBasedOutlierDetectionTest method testReferenceBasedOutlierDetectionGridBased.

@Test
public void testReferenceBasedOutlierDetectionGridBased() {
    Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
    OutlierResult result = // 
    new ELKIBuilder<>(ReferenceBasedOutlierDetection.class).with(ReferenceBasedOutlierDetection.Parameterizer.K_ID, // 
    11).with(GridBasedReferencePoints.Parameterizer.GRID_ID, // 
    3).build().run(db);
    testAUC(db, "Noise", result, 0.9693703703703);
    testSingleScore(result, 945, 0.933574455);
}
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 54 with ELKIBuilder

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

the class ReferenceBasedOutlierDetectionTest method testReferenceBasedOutlierDetectionSample.

@Test
public void testReferenceBasedOutlierDetectionSample() {
    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, // 
    RandomSampleReferencePoints.class).with(RandomSampleReferencePoints.Parameterizer.N_ID, // 
    15).with(RandomSampleReferencePoints.Parameterizer.RANDOM_ID, // 
    0).build().run(db);
    testAUC(db, "Noise", result, 0.829814814);
    testSingleScore(result, 945, 0.846881387);
}
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 55 with ELKIBuilder

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

the class ReferenceBasedOutlierDetectionTest method testReferenceBasedOutlierDetectionStar.

@Test
public void testReferenceBasedOutlierDetectionStar() {
    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, // 
    StarBasedReferencePoints.class).build().run(db);
    testAUC(db, "Noise", result, 0.910722222);
    testSingleScore(result, 945, 0.920950222);
}
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)

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