summaryrefslogtreecommitdiff
path: root/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm
diff options
context:
space:
mode:
Diffstat (limited to 'elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm')
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/AbstractSimpleAlgorithmTest.java1
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/KNNJoinTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/TestKNNJoin.java)8
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/DBSCANTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/TestDBSCAN.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/GriDBSCANTest.java118
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/SNNClusteringTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/TestSNNClusteringResults.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/affinitypropagation/AffinityPropagationClusteringAlgorithmTest.java111
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/CASHTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestCASHResults.java)19
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/COPACTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestCOPACResults.java)15
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/ERiCTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestERiCResults.java)21
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/FourCTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestFourCResults.java)13
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/LMCLUSTest.java87
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/ORCLUSTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestORCLUSResults.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/em/EMTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/em/TestEMResults.java)54
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/gdbscan/GeneralizedDBSCANTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/gdbscan/TestGeneralizedDBSCAN.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/gdbscan/LSDBCTest.java78
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/AGNESTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/TestAGNES.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/AnderbergHierarchicalClusteringTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/TestAnderbergHierarchicalClustering.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/CLINKTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/TestCLINKResults.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/SLINKTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/TestSLINKResults.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/CLARATest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestCLARA.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansBatchedLloydTest.java68
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansBisectingTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMeansBisecting.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansCompareTest.java66
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansElkanTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMeansElkan.java)13
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansHamerlyTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMeansHamerly.java)5
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansHybridLloydMacQueenTest.java70
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansLloydTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMeansLloyd.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansMacQueenTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMeansMacQueen.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansSortTest.java66
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMediansLloydTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMediansLloyd.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMedoidsEMTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMedoidsEM.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMedoidsPAMTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMedoidsPAM.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/SingleAssignmentKMeansTest.java67
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/XMeansTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestXMeans.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/FarthestPointsInitialMeansTest.java70
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/FarthestSumPointsInitialMeansTest.java70
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/FirstKInitialMeansTest.java69
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/KMeansPlusPlusInitialMeansTest.java70
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/PAMInitialMeansTest.java69
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/RandomlyChosenInitialMeansTest.java70
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/RandomlyGeneratedInitialMeansTest.java70
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/SampleKMeansInitializationTest.java74
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/parallel/ParallelLloydKMeansTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/parallel/TestParallelLloydKMeans.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/quality/WithinClusterMeanDistanceQualityMeasureTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/quality/TestWithinClusterMeanDistanceQualityMeasure.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/quality/WithinClusterVarianceQualityMeasureTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/quality/TestWithinClusterVarianceQualityMeasure.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiCluTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/TestDeLiCluResults.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/FastOPTICSTest.java62
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/OPTICSHeapTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/TestOPTICSHeapResults.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/OPTICSListTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/TestOPTICSListResults.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/CLIQUETest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestCLIQUEResults.java)34
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DOCTest.java91
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSHTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestDiSHResults.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/P3CTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestP3C.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/PROCLUSTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestPROCLUSResults.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/PreDeConTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestPreDeConResults.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/SUBCLUTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestSUBCLUResults.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/COPTest.java108
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/DWOFTest.java60
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/GaussianModelTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/TestGaussianModel.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/GaussianUniformMixtureTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/TestGaussianUniformMixture.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/OPTICSOFTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/TestOPTICSOF.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/SimpleCOPTest.java60
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/ABODTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/TestABOD.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/FastABODTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/TestFastABOD.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/LBABODTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/TestLBABOD.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/clustering/EMOutlierTest.java63
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/clustering/KMeansOutlierDetectionTest.java64
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/clustering/SilhouetteOutlierDetectionTest.java64
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/DBOutlierDetectionTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestDBOutlierDetection.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/DBOutlierScoreTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestDBOutlierScore.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/HilOutTest.java62
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/KNNOutlierTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestKNNOutlier.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/KNNWeightOutlierTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestKNNWeightOutlier.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/LocalIsolationCoefficientTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestLocalIsolationCoefficient.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/ODINTest.java61
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/ReferenceBasedOutlierDetectionTest.java151
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestReferenceBasedOutlierDetection.java61
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/parallel/ParallelKNNOutlierTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/parallel/TestParallelKNNOutlier.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/parallel/ParallelKNNWeightOutlierTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/parallel/TestParallelKNNWeightOutlier.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/ALOCITest.java62
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/COFTest.java61
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/FlexibleLOFTest.java61
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/INFLOTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestINFLO.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/KDEOSTest.java65
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDFTest.java62
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDOFTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestLDOF.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LOCITest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestLOCI.java)7
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LOFTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestLOF.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LoOPTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestLoOP.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/OnlineLOFTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestOnlineLOF.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimpleKernelDensityLOFTest.java63
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimplifiedLOFTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestSimplifiedLOF.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/VarianceOfVolumeTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestVarianceOfVolume.java)7
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelLOFTest.java62
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelSimplifiedLOFTest.java62
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/FeatureBaggingTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/TestFeatureBagging.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/HiCSTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/TestHiCS.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/AggarwalYuEvolutionaryTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/TestAggarwalYuEvolutionary.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/AggarwalYuNaiveTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/TestAggarwalYuNaive.java)3
-rw-r--r--elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/SODTest.java (renamed from elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/TestSOD.java)3
100 files changed, 2878 insertions, 170 deletions
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/AbstractSimpleAlgorithmTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/AbstractSimpleAlgorithmTest.java
index 4f92a350..b3911c52 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/AbstractSimpleAlgorithmTest.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/AbstractSimpleAlgorithmTest.java
@@ -60,6 +60,7 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Abstract base class useful for testing various algorithms.
*
* @author Erich Schubert
+ * @since 0.4.0
*/
public abstract class AbstractSimpleAlgorithmTest {
/**
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/TestKNNJoin.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/KNNJoinTest.java
index cf2ca7e0..c30896c3 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/TestKNNJoin.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/KNNJoinTest.java
@@ -57,7 +57,13 @@ import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
-public class TestKNNJoin implements JUnit4Test {
+/**
+ * Unit test for kNN joins.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class KNNJoinTest implements JUnit4Test {
// the following values depend on the data set used!
String dataset = "data/testdata/unittests/uebungsblatt-2d-mini.csv";
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/TestDBSCAN.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/DBSCANTest.java
index d457600f..7c2b0bce 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/TestDBSCAN.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/DBSCANTest.java
@@ -44,8 +44,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* @author Elke Achtert
* @author Erich Schubert
* @author Katharina Rausch
+ * @since 0.3
*/
-public class TestDBSCAN extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class DBSCANTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run DBSCAN with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/GriDBSCANTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/GriDBSCANTest.java
new file mode 100644
index 00000000..4afd3096
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/GriDBSCANTest.java
@@ -0,0 +1,118 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.data.model.Model;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Test GriDBSCAN.
+ *
+ * @author Erich Schubert
+ * @since 0.3
+ */
+public class GriDBSCANTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run DBSCAN with fixed parameters and compare the result to a golden
+ * standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testGriDBSCANResults() {
+ Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
+
+ // setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(DBSCAN.Parameterizer.EPSILON_ID, 0.04);
+ params.addParameter(DBSCAN.Parameterizer.MINPTS_ID, 20);
+ params.addParameter(GriDBSCAN.Parameterizer.GRID_ID, 0.08);
+ GriDBSCAN<DoubleVector> dbscan = ClassGenericsUtil.parameterizeOrAbort(GriDBSCAN.class, params);
+ testParameterizationOk(params);
+
+ // run DBSCAN on database
+ Clustering<Model> result = dbscan.run(db);
+
+ testFMeasure(db, result, 0.996413);
+ testClusterSizes(result, new int[] { 29, 50, 101, 150 });
+ }
+
+ /**
+ * Run DBSCAN with fixed parameters and compare the result to a golden
+ * standard, with larger grid width (fewer cells, less redundancy).
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testGriDBSCANWide() {
+ Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
+
+ // setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(DBSCAN.Parameterizer.EPSILON_ID, 0.04);
+ params.addParameter(DBSCAN.Parameterizer.MINPTS_ID, 20);
+ params.addParameter(GriDBSCAN.Parameterizer.GRID_ID, 0.4);
+ GriDBSCAN<DoubleVector> dbscan = ClassGenericsUtil.parameterizeOrAbort(GriDBSCAN.class, params);
+ testParameterizationOk(params);
+
+ // run DBSCAN on database
+ Clustering<Model> result = dbscan.run(db);
+
+ testFMeasure(db, result, 0.996413);
+ testClusterSizes(result, new int[] { 29, 50, 101, 150 });
+ }
+
+ /**
+ * Run DBSCAN with fixed parameters and compare the result to a golden
+ * standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testDBSCANOnSingleLinkDataset() {
+ Database db = makeSimpleDatabase(UNITTEST + "single-link-effect.ascii", 638);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(DBSCAN.Parameterizer.EPSILON_ID, 11.5);
+ params.addParameter(DBSCAN.Parameterizer.MINPTS_ID, 120);
+ params.addParameter(GriDBSCAN.Parameterizer.GRID_ID, 25.);
+ GriDBSCAN<DoubleVector> dbscan = ClassGenericsUtil.parameterizeOrAbort(GriDBSCAN.class, params);
+ testParameterizationOk(params);
+
+ // run DBSCAN on database
+ Clustering<Model> result = dbscan.run(db);
+ testFMeasure(db, result, 0.954382);
+ testClusterSizes(result, new int[] { 11, 200, 203, 224 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/TestSNNClusteringResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/SNNClusteringTest.java
index ca47b2e2..ecdb8a90 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/TestSNNClusteringResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/SNNClusteringTest.java
@@ -44,8 +44,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
*
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestSNNClusteringResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class SNNClusteringTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run SNNClustering with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/affinitypropagation/AffinityPropagationClusteringAlgorithmTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/affinitypropagation/AffinityPropagationClusteringAlgorithmTest.java
new file mode 100644
index 00000000..41a4d7d4
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/affinitypropagation/AffinityPropagationClusteringAlgorithmTest.java
@@ -0,0 +1,111 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.affinitypropagation;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.data.model.MedoidModel;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.distance.similarityfunction.kernel.PolynomialKernelFunction;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Test Affinity Propagation
+ *
+ * @author Erich Schubert
+ * @since 0.7.1
+ */
+public class AffinityPropagationClusteringAlgorithmTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run AffinityPropagationClusteringAlgorithm with fixed parameters and
+ * compare the result to a golden standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testAffinityPropagationClusteringAlgorithmResults() {
+ Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
+
+ // setup algorithm
+ ListParameterization params = new ListParameterization();
+ AffinityPropagationClusteringAlgorithm<DoubleVector> apc = ClassGenericsUtil.parameterizeOrAbort(AffinityPropagationClusteringAlgorithm.class, params);
+ testParameterizationOk(params);
+
+ // run AffinityPropagationClusteringAlgorithm on database
+ Clustering<MedoidModel> result = apc.run(db);
+
+ testFMeasure(db, result, 0.957227259);
+ testClusterSizes(result, new int[] { 5, 5, 7, 55, 105, 153 });
+ }
+
+ /**
+ * Run AffinityPropagationClusteringAlgorithm with fixed parameters and
+ * compare the result to a golden standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testAffinityPropagationClusteringAlgorithmOnSingleLinkDataset() {
+ Database db = makeSimpleDatabase(UNITTEST + "single-link-effect.ascii", 638);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ AffinityPropagationClusteringAlgorithm<DoubleVector> apc = ClassGenericsUtil.parameterizeOrAbort(AffinityPropagationClusteringAlgorithm.class, params);
+ testParameterizationOk(params);
+
+ // run AffinityPropagationClusteringAlgorithm on database
+ Clustering<MedoidModel> result = apc.run(db);
+ testFMeasure(db, result, 0.351689882);
+ testClusterSizes(result, new int[] { 24, 27, 29, 34, 36, 36, 37, 38, 41, 43, 43, 44, 46, 47, 56, 57 });
+ }
+
+ /**
+ * Run AffinityPropagationClusteringAlgorithm with fixed parameters and
+ * compare the result to a golden standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testAffinityPropagationSimilarity() {
+ Database db = makeSimpleDatabase(UNITTEST + "single-link-effect.ascii", 638);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(AffinityPropagationClusteringAlgorithm.Parameterizer.INITIALIZATION_ID, SimilarityBasedInitializationWithMedian.class);
+ params.addParameter(SimilarityBasedInitializationWithMedian.Parameterizer.SIMILARITY_ID, PolynomialKernelFunction.class);
+ AffinityPropagationClusteringAlgorithm<DoubleVector> apc = ClassGenericsUtil.parameterizeOrAbort(AffinityPropagationClusteringAlgorithm.class, params);
+ testParameterizationOk(params);
+
+ // run AffinityPropagationClusteringAlgorithm on database
+ Clustering<MedoidModel> result = apc.run(db);
+ testFMeasure(db, result, 0.352103);
+ testClusterSizes(result, new int[] { 20, 30, 32, 33, 34, 35, 36, 39, 39, 40, 43, 45, 45, 49, 49, 69 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestCASHResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/CASHTest.java
index e9f9f228..b0c225bf 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestCASHResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/CASHTest.java
@@ -39,11 +39,12 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* from the data set labels. This test ensures that CASH performance doesn't
* unexpectedly drop on this data set (and also ensures that the algorithms
* work, as a side effect).
- *
+ *
* @author Erich Schubert
* @author Katharina Rausch
+ * @since 0.2
*/
-public class TestCASHResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class CASHTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run CASH with fixed parameters and compare the result to a golden standard.
*/
@@ -54,10 +55,10 @@ public class TestCASHResults extends AbstractSimpleAlgorithmTest implements JUni
// CASH parameters
ListParameterization params = new ListParameterization();
- params.addParameter(CASH.JITTER_ID, 0.7);
- params.addParameter(CASH.MINPTS_ID, 50);
- params.addParameter(CASH.MAXLEVEL_ID, 25);
- params.addFlag(CASH.ADJUST_ID);
+ params.addParameter(CASH.Parameterizer.JITTER_ID, 0.7);
+ params.addParameter(CASH.Parameterizer.MINPTS_ID, 50);
+ params.addParameter(CASH.Parameterizer.MAXLEVEL_ID, 25);
+ params.addFlag(CASH.Parameterizer.ADJUST_ID);
// setup algorithm
CASH<DoubleVector> cash = ClassGenericsUtil.parameterizeOrAbort(CASH.class, params);
@@ -80,9 +81,9 @@ public class TestCASHResults extends AbstractSimpleAlgorithmTest implements JUni
// CASH parameters
ListParameterization params = new ListParameterization();
- params.addParameter(CASH.JITTER_ID, 0.7);
- params.addParameter(CASH.MINPTS_ID, 160);
- params.addParameter(CASH.MAXLEVEL_ID, 40);
+ params.addParameter(CASH.Parameterizer.JITTER_ID, 0.7);
+ params.addParameter(CASH.Parameterizer.MINPTS_ID, 160);
+ params.addParameter(CASH.Parameterizer.MAXLEVEL_ID, 40);
// setup algorithm
CASH<DoubleVector> cash = ClassGenericsUtil.parameterizeOrAbort(CASH.class, params);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestCOPACResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/COPACTest.java
index f3b06c81..95503656 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestCOPACResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/COPACTest.java
@@ -46,15 +46,16 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* from the data set labels. This test ensures that COPAC performance doesn't
* unexpectedly drop on this data set (and also ensures that the algorithms
* work, as a side effect).
- *
+ *
* @author Erich Schubert
* @author Katharina Rausch
+ * @since 0.3
*/
-public class TestCOPACResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class COPACTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run COPAC with fixed parameters and compare the result to a golden
* standard.
- *
+ *
* @throws ParameterException on errors.
*/
@Test
@@ -80,7 +81,7 @@ public class TestCOPACResults extends AbstractSimpleAlgorithmTest implements JUn
/**
* Run COPAC with fixed parameters and compare the result to a golden
* standard.
- *
+ *
* @throws ParameterException on errors.
*/
@Test
@@ -93,10 +94,10 @@ public class TestCOPACResults extends AbstractSimpleAlgorithmTest implements JUn
params.addParameter(DBSCAN.Parameterizer.MINPTS_ID, 20);
params.addParameter(COPAC.Settings.Parameterizer.K_ID, 45);
// PCA
- params.addParameter(PCARunner.PCA_COVARIANCE_MATRIX, WeightedCovarianceMatrixBuilder.class);
- params.addParameter(WeightedCovarianceMatrixBuilder.WEIGHT_ID, ErfcWeight.class);
+ params.addParameter(PCARunner.Parameterizer.PCA_COVARIANCE_MATRIX, WeightedCovarianceMatrixBuilder.class);
+ params.addParameter(WeightedCovarianceMatrixBuilder.Parameterizer.WEIGHT_ID, ErfcWeight.class);
params.addParameter(PCAFilteredRunner.Parameterizer.PCA_EIGENPAIR_FILTER, PercentageEigenPairFilter.class);
- params.addParameter(PercentageEigenPairFilter.ALPHA_ID, 0.8);
+ params.addParameter(PercentageEigenPairFilter.Parameterizer.ALPHA_ID, 0.8);
COPAC<DoubleVector> copac = ClassGenericsUtil.parameterizeOrAbort(COPAC.class, params);
testParameterizationOk(params);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestERiCResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/ERiCTest.java
index 7f2fb737..268fc827 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestERiCResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/ERiCTest.java
@@ -47,14 +47,15 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* from the data set labels. This test ensures that ERiC performance doesn't
* unexpectedly drop on this data set (and also ensures that the algorithms
* work, as a side effect).
- *
+ *
* @author Erich Schubert
* @author Katharina Rausch
+ * @since 0.2
*/
-public class TestERiCResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class ERiCTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run ERiC with fixed parameters and compare the result to a golden standard.
- *
+ *
* @throws ParameterException on errors.
*/
@Test
@@ -69,10 +70,10 @@ public class TestERiCResults extends AbstractSimpleAlgorithmTest implements JUni
params.addParameter(ERiC.Settings.Parameterizer.TAU_ID, 0.04);
params.addParameter(ERiC.Settings.Parameterizer.K_ID, 50);
// PCA
- params.addParameter(PCARunner.PCA_COVARIANCE_MATRIX, WeightedCovarianceMatrixBuilder.class);
- params.addParameter(WeightedCovarianceMatrixBuilder.WEIGHT_ID, ErfcWeight.class);
+ params.addParameter(PCARunner.Parameterizer.PCA_COVARIANCE_MATRIX, WeightedCovarianceMatrixBuilder.class);
+ params.addParameter(WeightedCovarianceMatrixBuilder.Parameterizer.WEIGHT_ID, ErfcWeight.class);
params.addParameter(PCAFilteredRunner.Parameterizer.PCA_EIGENPAIR_FILTER, RelativeEigenPairFilter.class);
- params.addParameter(RelativeEigenPairFilter.EIGENPAIR_FILTER_RALPHA, 1.60);
+ params.addParameter(RelativeEigenPairFilter.Parameterizer.EIGENPAIR_FILTER_RALPHA, 1.60);
ERiC<DoubleVector> eric = ClassGenericsUtil.parameterizeOrAbort(ERiC.class, params);
testParameterizationOk(params);
@@ -86,7 +87,7 @@ public class TestERiCResults extends AbstractSimpleAlgorithmTest implements JUni
/**
* Run ERiC with fixed parameters and compare the result to a golden standard.
- *
+ *
* @throws ParameterException on errors.
*/
@Test
@@ -102,10 +103,10 @@ public class TestERiCResults extends AbstractSimpleAlgorithmTest implements JUni
params.addParameter(ERiC.Settings.Parameterizer.TAU_ID, 1.0);
params.addParameter(ERiC.Settings.Parameterizer.K_ID, 45);
// PCA
- params.addParameter(PCARunner.PCA_COVARIANCE_MATRIX, WeightedCovarianceMatrixBuilder.class);
- params.addParameter(WeightedCovarianceMatrixBuilder.WEIGHT_ID, ErfcWeight.class);
+ params.addParameter(PCARunner.Parameterizer.PCA_COVARIANCE_MATRIX, WeightedCovarianceMatrixBuilder.class);
+ params.addParameter(WeightedCovarianceMatrixBuilder.Parameterizer.WEIGHT_ID, ErfcWeight.class);
params.addParameter(PCAFilteredRunner.Parameterizer.PCA_EIGENPAIR_FILTER, PercentageEigenPairFilter.class);
- params.addParameter(PercentageEigenPairFilter.ALPHA_ID, 0.6);
+ params.addParameter(PercentageEigenPairFilter.Parameterizer.ALPHA_ID, 0.6);
ERiC<DoubleVector> eric = ClassGenericsUtil.parameterizeOrAbort(ERiC.class, params);
testParameterizationOk(params);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestFourCResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/FourCTest.java
index 8bfa5962..ddfe8218 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestFourCResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/FourCTest.java
@@ -42,14 +42,15 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* the data set labels. This test ensures that 4C performance doesn't
* unexpectedly drop on this data set (and also ensures that the algorithms
* work, as a side effect).
- *
+ *
* @author Erich Schubert
* @author Katharina Rausch
+ * @since 0.3
*/
-public class TestFourCResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class FourCTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run 4F with fixed parameters and compare the result to a golden standard.
- *
+ *
* @throws ParameterException on errors.
*/
@Test
@@ -60,7 +61,7 @@ public class TestFourCResults extends AbstractSimpleAlgorithmTest implements JUn
ListParameterization params = new ListParameterization();
params.addParameter(DBSCAN.Parameterizer.EPSILON_ID, 0.30);
params.addParameter(DBSCAN.Parameterizer.MINPTS_ID, 50);
- params.addParameter(LimitEigenPairFilter.EIGENPAIR_FILTER_DELTA, 0.5);
+ params.addParameter(LimitEigenPairFilter.Parameterizer.EIGENPAIR_FILTER_DELTA, 0.5);
params.addParameter(FourC.Settings.Parameterizer.LAMBDA_ID, 1);
FourC<DoubleVector> fourc = ClassGenericsUtil.parameterizeOrAbort(FourC.class, params);
@@ -75,7 +76,7 @@ public class TestFourCResults extends AbstractSimpleAlgorithmTest implements JUn
/**
* Run ERiC with fixed parameters and compare the result to a golden standard.
- *
+ *
* @throws ParameterException on errors.
*/
@Test
@@ -87,7 +88,7 @@ public class TestFourCResults extends AbstractSimpleAlgorithmTest implements JUn
// 4C
params.addParameter(DBSCAN.Parameterizer.EPSILON_ID, 3);
params.addParameter(DBSCAN.Parameterizer.MINPTS_ID, 50);
- params.addParameter(LimitEigenPairFilter.EIGENPAIR_FILTER_DELTA, 0.5);
+ params.addParameter(LimitEigenPairFilter.Parameterizer.EIGENPAIR_FILTER_DELTA, 0.5);
params.addParameter(FourC.Settings.Parameterizer.LAMBDA_ID, 3);
FourC<DoubleVector> fourc = ClassGenericsUtil.parameterizeOrAbort(FourC.class, params);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/LMCLUSTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/LMCLUSTest.java
new file mode 100644
index 00000000..e3744626
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/LMCLUSTest.java
@@ -0,0 +1,87 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.correlation;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.model.Model;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Test the LMCLUS algorithm.
+ *
+ * @author Erich Schubert
+ * @since 0.3
+ */
+public class LMCLUSTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run 4F with fixed parameters and compare the result to a golden standard.
+ *
+ * @throws ParameterException on errors.
+ */
+ @Test
+ public void testLMCLUSResults() {
+ Database db = makeSimpleDatabase(UNITTEST + "hierarchical-3d2d1d.csv", 600);
+
+ ListParameterization params = new ListParameterization();
+ params.addParameter(LMCLUS.Parameterizer.MINSIZE_ID, 100);
+ params.addParameter(LMCLUS.Parameterizer.THRESHOLD_ID, 10);
+ params.addParameter(LMCLUS.Parameterizer.RANDOM_ID, 0);
+
+ LMCLUS lmclus = ClassGenericsUtil.parameterizeOrAbort(LMCLUS.class, params);
+ testParameterizationOk(params);
+
+ Clustering<Model> result = lmclus.run(db);
+ testFMeasure(db, result, 0.43327638);
+ testClusterSizes(result, new int[] { 201, 399 });
+ }
+
+ /**
+ * Run ERiC with fixed parameters and compare the result to a golden standard.
+ *
+ * @throws ParameterException on errors.
+ */
+ @Test
+ public void testLMCLUSOverlap() {
+ Database db = makeSimpleDatabase(UNITTEST + "correlation-overlap-3-5d.ascii", 650);
+
+ ListParameterization params = new ListParameterization();
+ params.addParameter(LMCLUS.Parameterizer.MINSIZE_ID, 100);
+ params.addParameter(LMCLUS.Parameterizer.THRESHOLD_ID, 10);
+ params.addParameter(LMCLUS.Parameterizer.RANDOM_ID, 0);
+
+ LMCLUS lmclus = ClassGenericsUtil.parameterizeOrAbort(LMCLUS.class, params);
+ testParameterizationOk(params);
+
+ Clustering<Model> result = lmclus.run(db);
+ testClusterSizes(result, new int[] { 196, 454 });
+ testFMeasure(db, result, 0.6547222);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestORCLUSResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/ORCLUSTest.java
index cd6d4558..f71f863a 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/TestORCLUSResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/ORCLUSTest.java
@@ -43,8 +43,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
*
* @author Elke Achtert
* @author Katharina Rausch
+ * @since 0.3
*/
-public class TestORCLUSResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class ORCLUSTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run ORCLUS with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/em/TestEMResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/em/EMTest.java
index 629a78d5..0ede15bb 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/em/TestEMResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/em/EMTest.java
@@ -32,7 +32,6 @@ import de.lmu.ifi.dbs.elki.data.Clustering;
import de.lmu.ifi.dbs.elki.data.DoubleVector;
import de.lmu.ifi.dbs.elki.database.Database;
import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
-import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
/**
@@ -40,15 +39,14 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* from the data set labels. This test ensures that EM's performance doesn't
* unexpectedly drop on this data set (and also ensures that the algorithms
* work, as a side effect).
- *
+ *
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestEMResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class EMTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run EM with fixed parameters and compare the result to a golden standard.
- *
- * @throws ParameterException
*/
@Test
public void testEMResults() {
@@ -63,7 +61,49 @@ public class TestEMResults extends AbstractSimpleAlgorithmTest implements JUnit4
// run EM on database
Clustering<?> result = em.run(db);
- testFMeasure(db, result, 0.781737);
- testClusterSizes(result, new int[] { 2, 5, 17, 175, 200, 311 });
+ testFMeasure(db, result, 0.780036);
+ testClusterSizes(result, new int[] { 2, 5, 27, 171, 200, 305 });
+ }
+
+ /**
+ * Run EM with fixed parameters and compare the result to a golden standard.
+ */
+ @Test
+ public void testEMResultsDiagonal() {
+ Database db = makeSimpleDatabase(UNITTEST + "hierarchical-2d.ascii", 710);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KMeans.SEED_ID, 0);
+ params.addParameter(EM.Parameterizer.K_ID, 6);
+ params.addParameter(EM.Parameterizer.INIT_ID, DiagonalGaussianModelFactory.class);
+ EM<DoubleVector, ?> em = ClassGenericsUtil.parameterizeOrAbort(EM.class, params);
+ testParameterizationOk(params);
+
+ // run EM on database
+ Clustering<?> result = em.run(db);
+ testFMeasure(db, result, 0.9302319);
+ testClusterSizes(result, new int[] { 7, 22, 93, 97, 200, 291 });
+ }
+
+ /**
+ * Run EM with fixed parameters and compare the result to a golden standard.
+ */
+ @Test
+ public void testEMResultsSpherical() {
+ Database db = makeSimpleDatabase(UNITTEST + "hierarchical-2d.ascii", 710);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KMeans.SEED_ID, 0);
+ params.addParameter(EM.Parameterizer.K_ID, 6);
+ params.addParameter(EM.Parameterizer.INIT_ID, SphericalGaussianModelFactory.class);
+ EM<DoubleVector, ?> em = ClassGenericsUtil.parameterizeOrAbort(EM.class, params);
+ testParameterizationOk(params);
+
+ // run EM on database
+ Clustering<?> result = em.run(db);
+ testFMeasure(db, result, 0.514850);
+ testClusterSizes(result, new int[] { 0, 6, 53, 69, 191, 391 });
}
} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/gdbscan/TestGeneralizedDBSCAN.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/gdbscan/GeneralizedDBSCANTest.java
index c5bb1c5e..3c77f029 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/gdbscan/TestGeneralizedDBSCAN.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/gdbscan/GeneralizedDBSCANTest.java
@@ -44,8 +44,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* @author Elke Achtert
* @author Erich Schubert
* @author Katharina Rausch
+ * @since 0.3
*/
-public class TestGeneralizedDBSCAN extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class GeneralizedDBSCANTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run Generalized DBSCAN with fixed parameters and compare the result to a
* golden standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/gdbscan/LSDBCTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/gdbscan/LSDBCTest.java
new file mode 100644
index 00000000..c33ba0e7
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/gdbscan/LSDBCTest.java
@@ -0,0 +1,78 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.gdbscan;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.data.model.Model;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Regression test for LSDBC.
+ *
+ * @author Erich Schubert
+ * @since 0.3
+ */
+public class LSDBCTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testLSDBCResults() {
+ Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
+
+ // setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(LSDBC.Parameterizer.ALPHA_ID, 0.4);
+ params.addParameter(LSDBC.Parameterizer.K_ID, 20);
+ LSDBC<DoubleVector> dbscan = ClassGenericsUtil.parameterizeOrAbort(LSDBC.class, params);
+ testParameterizationOk(params);
+
+ // run LSDBC on database
+ Clustering<Model> result = dbscan.run(db);
+
+ testFMeasure(db, result, 0.44848979);
+ testClusterSizes(result, new int[] { 38, 38, 41, 54, 159 });
+ }
+
+ @Test
+ public void testLSDBCOnSingleLinkDataset() {
+ Database db = makeSimpleDatabase(UNITTEST + "single-link-effect.ascii", 638);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(LSDBC.Parameterizer.ALPHA_ID, 0.2);
+ params.addParameter(LSDBC.Parameterizer.K_ID, 120);
+ LSDBC<DoubleVector> dbscan = ClassGenericsUtil.parameterizeOrAbort(LSDBC.class, params);
+ testParameterizationOk(params);
+
+ // run LSDBC on database
+ Clustering<Model> result = dbscan.run(db);
+ testFMeasure(db, result, 0.95681073);
+ testClusterSizes(result, new int[] { 32, 197, 203, 206 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/TestAGNES.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/AGNESTest.java
index f12ae73d..c0421a54 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/TestAGNES.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/AGNESTest.java
@@ -39,8 +39,9 @@ import de.lmu.ifi.dbs.elki.workflow.AlgorithmStep;
* Perform agglomerative hierarchical clustering, using the naive algorithm.
*
* @author Erich Schubert
+ * @since 0.6.0
*/
-public class TestAGNES extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class AGNESTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
// TODO: add more data sets.
/**
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/TestAnderbergHierarchicalClustering.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/AnderbergHierarchicalClusteringTest.java
index 6dd73ec6..c94557dd 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/TestAnderbergHierarchicalClustering.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/AnderbergHierarchicalClusteringTest.java
@@ -40,8 +40,9 @@ import de.lmu.ifi.dbs.elki.workflow.AlgorithmStep;
* algorithm.
*
* @author Erich Schubert
+ * @since 0.6.0
*/
-public class TestAnderbergHierarchicalClustering extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class AnderbergHierarchicalClusteringTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
// TODO: add more data sets.
/**
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/TestCLINKResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/CLINKTest.java
index d9276c5b..b6ce8545 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/TestCLINKResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/CLINKTest.java
@@ -42,8 +42,9 @@ import de.lmu.ifi.dbs.elki.workflow.AlgorithmStep;
* work, as a side effect).
*
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestCLINKResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class CLINKTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run CLINK with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/TestSLINKResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/SLINKTest.java
index 22b143a4..bde1e243 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/TestSLINKResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/SLINKTest.java
@@ -43,8 +43,9 @@ import de.lmu.ifi.dbs.elki.workflow.AlgorithmStep;
*
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestSLINKResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class SLINKTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
// TODO: add a test for a non-single-link dataset?
/**
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestCLARA.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/CLARATest.java
index f9c0b779..89599bda 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestCLARA.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/CLARATest.java
@@ -43,8 +43,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
*
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestCLARA extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class CLARATest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run CLARA with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansBatchedLloydTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansBatchedLloydTest.java
new file mode 100644
index 00000000..bab15c09
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansBatchedLloydTest.java
@@ -0,0 +1,68 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Regression test for batched Lloyd k-means.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class KMeansBatchedLloydTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run KMeans with fixed parameters and compare the result to a golden
+ * standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testKMeansBatchedLloyd() {
+ Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KMeans.K_ID, 5);
+ params.addParameter(KMeans.SEED_ID, 2);
+ params.addParameter(KMeansBatchedLloyd.Parameterizer.BLOCKS_ID, 10);
+ params.addParameter(KMeansBatchedLloyd.Parameterizer.RANDOM_ID, 0);
+ AbstractKMeans<DoubleVector, ?> kmeans = ClassGenericsUtil.parameterizeOrAbort(KMeansBatchedLloyd.class, params);
+ testParameterizationOk(params);
+
+ // run KMeans on database
+ Clustering<?> result = kmeans.run(db);
+ testFMeasure(db, result, 0.998005);
+ testClusterSizes(result, new int[] { 199, 200, 200, 200, 201 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMeansBisecting.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansBisectingTest.java
index 06d55028..cb407e28 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMeansBisecting.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansBisectingTest.java
@@ -39,8 +39,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the KMeansBisecting
*
* @author Stephan Baier
+ * @since 0.6.0
*/
-public class TestKMeansBisecting extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class KMeansBisectingTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run KMeansBisecting with fixed parameters and compare cluster size to
* expected value.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansCompareTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansCompareTest.java
new file mode 100644
index 00000000..fead9461
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansCompareTest.java
@@ -0,0 +1,66 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Regression test for Compare k-means.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class KMeansCompareTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run KMeans with fixed parameters and compare the result to a golden
+ * standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testKMeansCompare() {
+ Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KMeans.K_ID, 5);
+ params.addParameter(KMeans.SEED_ID, 2);
+ AbstractKMeans<DoubleVector, ?> kmeans = ClassGenericsUtil.parameterizeOrAbort(KMeansCompare.class, params);
+ testParameterizationOk(params);
+
+ // run KMeans on database
+ Clustering<?> result = kmeans.run(db);
+ testFMeasure(db, result, 0.998005);
+ testClusterSizes(result, new int[] { 199, 200, 200, 200, 201 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMeansElkan.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansElkanTest.java
index 95f28c5d..2d1cbe5a 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMeansElkan.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansElkanTest.java
@@ -35,26 +35,27 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
/**
- * Regression test for Hamerly k-means.
- *
+ * Regression test for Elkan k-means.
+ *
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestKMeansElkan extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class KMeansElkanTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run KMeans with fixed parameters and compare the result to a golden
* standard.
- *
+ *
* @throws ParameterException
*/
@Test
- public void testKMeansLloyd() {
+ public void testKMeansElkan() {
Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
// Setup algorithm
ListParameterization params = new ListParameterization();
params.addParameter(KMeans.K_ID, 5);
params.addParameter(KMeans.SEED_ID, 2);
- AbstractKMeans<DoubleVector, ?> kmeans = ClassGenericsUtil.parameterizeOrAbort(KMeansHamerly.class, params);
+ AbstractKMeans<DoubleVector, ?> kmeans = ClassGenericsUtil.parameterizeOrAbort(KMeansElkan.class, params);
testParameterizationOk(params);
// run KMeans on database
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMeansHamerly.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansHamerlyTest.java
index e709861e..328211fb 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMeansHamerly.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansHamerlyTest.java
@@ -38,8 +38,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Regression test for Hamerly k-means.
*
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestKMeansHamerly extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class KMeansHamerlyTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run KMeans with fixed parameters and compare the result to a golden
* standard.
@@ -47,7 +48,7 @@ public class TestKMeansHamerly extends AbstractSimpleAlgorithmTest implements JU
* @throws ParameterException
*/
@Test
- public void testKMeansLloyd() {
+ public void testKMeansHamerly() {
Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
// Setup algorithm
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansHybridLloydMacQueenTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansHybridLloydMacQueenTest.java
new file mode 100644
index 00000000..390f5c3d
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansHybridLloydMacQueenTest.java
@@ -0,0 +1,70 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Performs a full KMeans run, and compares the result with a clustering derived
+ * from the data set labels. This test ensures that KMeans's performance doesn't
+ * unexpectedly drop on this data set (and also ensures that the algorithms
+ * work, as a side effect).
+ *
+ * @author Katharina Rausch
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class KMeansHybridLloydMacQueenTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run KMeans with fixed parameters and compare the result to a golden
+ * standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testKMeansHybridLloydMacQueen() {
+ Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KMeans.K_ID, 5);
+ params.addParameter(KMeans.SEED_ID, 2);
+ AbstractKMeans<DoubleVector, ?> kmeans = ClassGenericsUtil.parameterizeOrAbort(KMeansHybridLloydMacQueen.class, params);
+ testParameterizationOk(params);
+
+ // run KMeans on database
+ Clustering<?> result = kmeans.run(db);
+ testFMeasure(db, result, 0.998005);
+ testClusterSizes(result, new int[] { 199, 200, 200, 200, 201 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMeansLloyd.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansLloydTest.java
index 15d73657..a0edbe5e 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMeansLloyd.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansLloydTest.java
@@ -42,8 +42,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
*
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestKMeansLloyd extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class KMeansLloydTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run KMeans with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMeansMacQueen.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansMacQueenTest.java
index b4289b9f..6271929d 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMeansMacQueen.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansMacQueenTest.java
@@ -42,8 +42,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
*
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestKMeansMacQueen extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class KMeansMacQueenTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run KMeans with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansSortTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansSortTest.java
new file mode 100644
index 00000000..b7b20097
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMeansSortTest.java
@@ -0,0 +1,66 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Regression test for Sort-means.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class KMeansSortTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run KMeans with fixed parameters and compare the result to a golden
+ * standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testKMeansSort() {
+ Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KMeans.K_ID, 5);
+ params.addParameter(KMeans.SEED_ID, 2);
+ AbstractKMeans<DoubleVector, ?> kmeans = ClassGenericsUtil.parameterizeOrAbort(KMeansSort.class, params);
+ testParameterizationOk(params);
+
+ // run KMeans on database
+ Clustering<?> result = kmeans.run(db);
+ testFMeasure(db, result, 0.998005);
+ testClusterSizes(result, new int[] { 199, 200, 200, 200, 201 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMediansLloyd.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMediansLloydTest.java
index ab451cab..c7abf806 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMediansLloyd.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMediansLloydTest.java
@@ -42,8 +42,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
*
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestKMediansLloyd extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class KMediansLloydTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run KMedians with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMedoidsEM.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMedoidsEMTest.java
index ecfafffe..eee1c799 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMedoidsEM.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMedoidsEMTest.java
@@ -41,8 +41,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
*
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestKMedoidsEM extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class KMedoidsEMTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run KMedoidsEM with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMedoidsPAM.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMedoidsPAMTest.java
index 4bb98041..a7fe2712 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestKMedoidsPAM.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/KMedoidsPAMTest.java
@@ -43,8 +43,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
*
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestKMedoidsPAM extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class KMedoidsPAMTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run KMedians PAM with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/SingleAssignmentKMeansTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/SingleAssignmentKMeansTest.java
new file mode 100644
index 00000000..c20790b9
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/SingleAssignmentKMeansTest.java
@@ -0,0 +1,67 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Performs a full KMeans run, and compares the result with a clustering derived
+ * from the data set labels. This test ensures that KMeans's performance doesn't
+ * unexpectedly drop on this data set (and also ensures that the algorithms
+ * work, as a side effect).
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class SingleAssignmentKMeansTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run KMeans with fixed parameters and compare the result to a golden
+ * standard.
+ */
+ @Test
+ public void testSingleAssignmentKMeans() {
+ Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KMeans.K_ID, 5);
+ params.addParameter(KMeans.SEED_ID, 3);
+ AbstractKMeans<DoubleVector, ?> kmeans = ClassGenericsUtil.parameterizeOrAbort(SingleAssignmentKMeans.class, params);
+ testParameterizationOk(params);
+
+ // run KMeans on database
+ Clustering<?> result = kmeans.run(db);
+ // Unsurprisingly, these results are much worse than normal k-means
+ testFMeasure(db, result, 0.7936860577);
+ testClusterSizes(result, new int[] { 52, 151, 200, 201, 396 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestXMeans.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/XMeansTest.java
index 58871f75..91ec25e2 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/TestXMeans.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/XMeansTest.java
@@ -39,8 +39,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
*
* @author Tibor Goldschwendt
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestXMeans extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class XMeansTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testXMeans() {
Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/FarthestPointsInitialMeansTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/FarthestPointsInitialMeansTest.java
new file mode 100644
index 00000000..f077abf7
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/FarthestPointsInitialMeansTest.java
@@ -0,0 +1,70 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.initialization;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2016
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.AbstractKMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.SingleAssignmentKMeans;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Performs a single assignment with different k-means initializations.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class FarthestPointsInitialMeansTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run KMeans with fixed parameters and compare the result to a golden
+ * standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testFarthestPointsInitialMeans() {
+ Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KMeans.K_ID, 5);
+ params.addParameter(KMeans.SEED_ID, 3);
+ params.addParameter(KMeans.INIT_ID, FarthestPointsInitialMeans.class);
+ AbstractKMeans<DoubleVector, ?> kmeans = ClassGenericsUtil.parameterizeOrAbort(SingleAssignmentKMeans.class, params);
+ testParameterizationOk(params);
+
+ // run KMeans on database
+ Clustering<?> result = kmeans.run(db);
+ testFMeasure(db, result, 0.88132453);
+ testClusterSizes(result, new int[] { 128, 199, 201, 201, 271 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/FarthestSumPointsInitialMeansTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/FarthestSumPointsInitialMeansTest.java
new file mode 100644
index 00000000..2f592fb3
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/FarthestSumPointsInitialMeansTest.java
@@ -0,0 +1,70 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.initialization;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2016
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.AbstractKMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.SingleAssignmentKMeans;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Performs a single assignment with different k-means initializations.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class FarthestSumPointsInitialMeansTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run KMeans with fixed parameters and compare the result to a golden
+ * standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testFarthestSumPointsInitialMeans() {
+ Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KMeans.K_ID, 5);
+ params.addParameter(KMeans.SEED_ID, 3);
+ params.addParameter(KMeans.INIT_ID, FarthestSumPointsInitialMeans.class);
+ AbstractKMeans<DoubleVector, ?> kmeans = ClassGenericsUtil.parameterizeOrAbort(SingleAssignmentKMeans.class, params);
+ testParameterizationOk(params);
+
+ // run KMeans on database
+ Clustering<?> result = kmeans.run(db);
+ testFMeasure(db, result, 0.80399668933);
+ testClusterSizes(result, new int[] { 32, 169, 199, 201, 399 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/FirstKInitialMeansTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/FirstKInitialMeansTest.java
new file mode 100644
index 00000000..dbcd91da
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/FirstKInitialMeansTest.java
@@ -0,0 +1,69 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.initialization;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2016
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.AbstractKMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.SingleAssignmentKMeans;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Performs a single assignment with different k-means initializations.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class FirstKInitialMeansTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run KMeans with fixed parameters and compare the result to a golden
+ * standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testFirstKInitialMeans() {
+ Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KMeans.K_ID, 5);
+ params.addParameter(KMeans.INIT_ID, FirstKInitialMeans.class);
+ AbstractKMeans<DoubleVector, ?> kmeans = ClassGenericsUtil.parameterizeOrAbort(SingleAssignmentKMeans.class, params);
+ testParameterizationOk(params);
+
+ // run KMeans on database
+ Clustering<?> result = kmeans.run(db);
+ testFMeasure(db, result, 0.62025907);
+ testClusterSizes(result, new int[] { 23, 38, 226, 258, 455 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/KMeansPlusPlusInitialMeansTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/KMeansPlusPlusInitialMeansTest.java
new file mode 100644
index 00000000..0b9355e3
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/KMeansPlusPlusInitialMeansTest.java
@@ -0,0 +1,70 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.initialization;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.AbstractKMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.SingleAssignmentKMeans;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Performs a single assignment with different k-means initializations.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class KMeansPlusPlusInitialMeansTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run KMeans with fixed parameters and compare the result to a golden
+ * standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testSingleAssignmentKMeansPlusPlus() {
+ Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KMeans.K_ID, 5);
+ params.addParameter(KMeans.SEED_ID, 3);
+ params.addParameter(KMeans.INIT_ID, KMeansPlusPlusInitialMeans.class);
+ AbstractKMeans<DoubleVector, ?> kmeans = ClassGenericsUtil.parameterizeOrAbort(SingleAssignmentKMeans.class, params);
+ testParameterizationOk(params);
+
+ // run KMeans on database
+ Clustering<?> result = kmeans.run(db);
+ testFMeasure(db, result, 0.99800500);
+ testClusterSizes(result, new int[] { 199, 200, 200, 200, 201 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/PAMInitialMeansTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/PAMInitialMeansTest.java
new file mode 100644
index 00000000..c0d2b46d
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/PAMInitialMeansTest.java
@@ -0,0 +1,69 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.initialization;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2016
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.AbstractKMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.SingleAssignmentKMeans;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Performs a single assignment with different k-means initializations.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class PAMInitialMeansTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run KMeans with fixed parameters and compare the result to a golden
+ * standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testPAMInitialMeans() {
+ Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KMeans.K_ID, 5);
+ params.addParameter(KMeans.INIT_ID, PAMInitialMeans.class);
+ AbstractKMeans<DoubleVector, ?> kmeans = ClassGenericsUtil.parameterizeOrAbort(SingleAssignmentKMeans.class, params);
+ testParameterizationOk(params);
+
+ // run KMeans on database
+ Clustering<?> result = kmeans.run(db);
+ testFMeasure(db, result, 0.99800500);
+ testClusterSizes(result, new int[] { 199, 200, 200, 200, 201 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/RandomlyChosenInitialMeansTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/RandomlyChosenInitialMeansTest.java
new file mode 100644
index 00000000..a1e36fde
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/RandomlyChosenInitialMeansTest.java
@@ -0,0 +1,70 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.initialization;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2016
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.AbstractKMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.SingleAssignmentKMeans;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Performs a single assignment with different k-means initializations.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class RandomlyChosenInitialMeansTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run KMeans with fixed parameters and compare the result to a golden
+ * standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testRandomlyChosenInitialMeans() {
+ Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KMeans.K_ID, 5);
+ params.addParameter(KMeans.SEED_ID, 3);
+ params.addParameter(KMeans.INIT_ID, RandomlyChosenInitialMeans.class);
+ AbstractKMeans<DoubleVector, ?> kmeans = ClassGenericsUtil.parameterizeOrAbort(SingleAssignmentKMeans.class, params);
+ testParameterizationOk(params);
+
+ // run KMeans on database
+ Clustering<?> result = kmeans.run(db);
+ testFMeasure(db, result, 0.793686);
+ testClusterSizes(result, new int[] { 52, 151, 200, 201, 396 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/RandomlyGeneratedInitialMeansTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/RandomlyGeneratedInitialMeansTest.java
new file mode 100644
index 00000000..045e6b4f
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/RandomlyGeneratedInitialMeansTest.java
@@ -0,0 +1,70 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.initialization;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2016
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.AbstractKMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.SingleAssignmentKMeans;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Performs a single assignment with different k-means initializations.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class RandomlyGeneratedInitialMeansTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run KMeans with fixed parameters and compare the result to a golden
+ * standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testRandomlyGeneratedInitialMeans() {
+ Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KMeans.K_ID, 5);
+ params.addParameter(KMeans.SEED_ID, 3);
+ params.addParameter(KMeans.INIT_ID, RandomlyGeneratedInitialMeans.class);
+ AbstractKMeans<DoubleVector, ?> kmeans = ClassGenericsUtil.parameterizeOrAbort(SingleAssignmentKMeans.class, params);
+ testParameterizationOk(params);
+
+ // run KMeans on database
+ Clustering<?> result = kmeans.run(db);
+ testFMeasure(db, result, 0.7597720973);
+ testClusterSizes(result, new int[] { 66, 200, 200, 245, 289 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/SampleKMeansInitializationTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/SampleKMeansInitializationTest.java
new file mode 100644
index 00000000..9d9e4a2a
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/initialization/SampleKMeansInitializationTest.java
@@ -0,0 +1,74 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.initialization;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.AbstractKMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeansHamerly;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.SingleAssignmentKMeans;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Performs a single assignment with different k-means initializations.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class SampleKMeansInitializationTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run KMeans with fixed parameters and compare the result to a golden
+ * standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testSampleKMeansInitialization() {
+ Database db = makeSimpleDatabase(UNITTEST + "different-densities-2d-no-noise.ascii", 1000);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KMeans.K_ID, 5);
+ params.addParameter(KMeans.SEED_ID, 3);
+ params.addParameter(KMeans.INIT_ID, SampleKMeansInitialization.class);
+ params.addParameter(SampleKMeansInitialization.Parameterizer.KMEANS_ID, KMeansHamerly.class);
+ params.addParameter(KMeans.SEED_ID, 3);
+ params.addParameter(SampleKMeansInitialization.Parameterizer.SAMPLE_ID, 100);
+ AbstractKMeans<DoubleVector, ?> kmeans = ClassGenericsUtil.parameterizeOrAbort(SingleAssignmentKMeans.class, params);
+ testParameterizationOk(params);
+
+ // run KMeans on database
+ Clustering<?> result = kmeans.run(db);
+ testFMeasure(db, result, 0.780753320);
+ testClusterSizes(result, new int[] { 75, 125, 200, 205, 395 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/parallel/TestParallelLloydKMeans.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/parallel/ParallelLloydKMeansTest.java
index a396cf73..cf6151cf 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/parallel/TestParallelLloydKMeans.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/parallel/ParallelLloydKMeansTest.java
@@ -44,8 +44,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
*
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestParallelLloydKMeans extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class ParallelLloydKMeansTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run KMeans with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/quality/TestWithinClusterMeanDistanceQualityMeasure.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/quality/WithinClusterMeanDistanceQualityMeasureTest.java
index f4531305..d2f619e7 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/quality/TestWithinClusterMeanDistanceQualityMeasure.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/quality/WithinClusterMeanDistanceQualityMeasureTest.java
@@ -47,8 +47,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Test cluster quality measure computations.
*
* @author Stephan Baier
+ * @since 0.6.0
*/
-public class TestWithinClusterMeanDistanceQualityMeasure extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class WithinClusterMeanDistanceQualityMeasureTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Test cluster average overall distance.
*/
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/quality/TestWithinClusterVarianceQualityMeasure.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/quality/WithinClusterVarianceQualityMeasureTest.java
index 57b6ba75..eee4bf74 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/quality/TestWithinClusterVarianceQualityMeasure.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/quality/WithinClusterVarianceQualityMeasureTest.java
@@ -47,8 +47,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Test cluster quality measure computations.
*
* @author Stephan Baier
+ * @since 0.6.0
*/
-public class TestWithinClusterVarianceQualityMeasure extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class WithinClusterVarianceQualityMeasureTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Test cluster variance.
*/
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/TestDeLiCluResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiCluTest.java
index 51879af4..2773a61e 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/TestDeLiCluResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/DeLiCluTest.java
@@ -49,8 +49,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
*
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestDeLiCluResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class DeLiCluTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run DeLiClu with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/FastOPTICSTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/FastOPTICSTest.java
new file mode 100644
index 00000000..3b00856a
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/FastOPTICSTest.java
@@ -0,0 +1,62 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.optics;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.index.preprocessed.fastoptics.RandomProjectedNeighborsAndDensities;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Simple regression test for FastOPTICS.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class FastOPTICSTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testFastOPTICS() {
+ Database db = makeSimpleDatabase(UNITTEST + "hierarchical-2d.ascii", 710);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(OPTICSList.Parameterizer.MINPTS_ID, 18);
+ params.addParameter(OPTICSXi.Parameterizer.XI_ID, 0.038);
+ params.addParameter(OPTICSXi.Parameterizer.XIALG_ID, FastOPTICS.class);
+ params.addParameter(RandomProjectedNeighborsAndDensities.Parameterizer.RANDOM_ID, 0);
+ OPTICSXi opticsxi = ClassGenericsUtil.parameterizeOrAbort(OPTICSXi.class, params);
+ testParameterizationOk(params);
+
+ // run OPTICS on database
+ Clustering<?> clustering = opticsxi.run(db);
+
+ testFMeasure(db, clustering, 0.7495221);
+ testClusterSizes(clustering, new int[] { 3, 4, 5, 6, 7, 8, 13, 18, 23, 26, 36, 40, 42, 95, 167, 217 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/TestOPTICSHeapResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/OPTICSHeapTest.java
index f318636d..d47e5ea2 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/TestOPTICSHeapResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/OPTICSHeapTest.java
@@ -41,8 +41,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
*
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestOPTICSHeapResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class OPTICSHeapTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run OPTICS with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/TestOPTICSListResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/OPTICSListTest.java
index 249c3cad..27125ad9 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/TestOPTICSListResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/OPTICSListTest.java
@@ -41,8 +41,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
*
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestOPTICSListResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class OPTICSListTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run OPTICS with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestCLIQUEResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/CLIQUETest.java
index 25019d7a..b71bd57b 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestCLIQUEResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/CLIQUETest.java
@@ -40,16 +40,17 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* from the data set labels. This test ensures that CLIQUE performance doesn't
* unexpectedly drop on this data set (and also ensures that the algorithms
* work, as a side effect).
- *
+ *
* @author Elke Achtert
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.3
*/
-public class TestCLIQUEResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class CLIQUETest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run CLIQUE with fixed parameters and compare the result to a golden
* standard.
- *
+ *
* @throws ParameterException
*/
@Test
@@ -75,7 +76,7 @@ public class TestCLIQUEResults extends AbstractSimpleAlgorithmTest implements JU
/**
* Run CLIQUE with fixed parameters and compare the result to a golden
* standard.
- *
+ *
* @throws ParameterException
*/
@Test
@@ -95,4 +96,29 @@ public class TestCLIQUEResults extends AbstractSimpleAlgorithmTest implements JU
// testFMeasure(db, result, 0.433661);
testClusterSizes(result, new int[] { 255, 409, 458, 458, 480 });
}
+
+ /**
+ * Run CLIQUE with fixed parameters and compare the result to a golden
+ * standard.
+ *
+ * @throws ParameterException
+ */
+ @Test
+ public void testCLIQUESubspaceOverlappingPrune() {
+ Database db = makeSimpleDatabase(UNITTEST + "subspace-overlapping-3-4d.ascii", 850);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(CLIQUE.TAU_ID, 0.2);
+ params.addParameter(CLIQUE.XSI_ID, 6);
+ params.addFlag(CLIQUE.PRUNE_ID);
+ CLIQUE<DoubleVector> clique = ClassGenericsUtil.parameterizeOrAbort(CLIQUE.class, params);
+ testParameterizationOk(params);
+
+ // run CLIQUE on database
+ Clustering<SubspaceModel> result = clique.run(db);
+ // PairCounting is not appropriate here: overlapping clusterings!
+ // testFMeasure(db, result, 0.433661);
+ testClusterSizes(result, new int[] { 255, 409, 458, 458, 480 });
+ }
} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DOCTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DOCTest.java
new file mode 100644
index 00000000..00fe42bf
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DOCTest.java
@@ -0,0 +1,91 @@
+package de.lmu.ifi.dbs.elki.algorithm.clustering.subspace;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.Clustering;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Test DOC on a simple test data set.
+ *
+ * On the first set, its an all-or-nothing depending on the parameters.
+ *
+ * @author Erich Schubert
+ * @since 0.3
+ */
+public class DOCTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ /**
+ * Run DOC with fixed parameters and compare the result to a golden standard.
+ */
+ @Test
+ public void testDOCSimple() {
+ Database db = makeSimpleDatabase(UNITTEST + "subspace-simple.csv", 600);
+
+ ListParameterization params = new ListParameterization();
+ params.addParameter(DOC.Parameterizer.RANDOM_ID, 0);
+ params.addParameter(DOC.Parameterizer.ALPHA_ID, 0.4);
+ params.addParameter(DOC.Parameterizer.BETA_ID, 0.85);
+
+ // setup algorithm
+ DOC<DoubleVector> doc = ClassGenericsUtil.parameterizeOrAbort(DOC.class, params);
+ testParameterizationOk(params);
+
+ // run DOC on database
+ Clustering<?> result = doc.run(db);
+
+ testClusterSizes(result, new int[] { 200, 400 });
+ testFMeasure(db, result, 1.0);
+ }
+
+ /**
+ * Run DOC with fixed parameters and compare the result to a golden standard.
+ */
+ @Test
+ public void testDOCOverlapping() {
+ Database db = makeSimpleDatabase(UNITTEST + "subspace-overlapping-3-4d.ascii", 850);
+
+ // Setup algorithm
+ ListParameterization params = new ListParameterization();
+ params.addParameter(DOC.Parameterizer.RANDOM_ID, 0);
+ params.addParameter(DOC.Parameterizer.ALPHA_ID, 0.4);
+ params.addParameter(DOC.Parameterizer.BETA_ID, 0.95);
+ params.addFlag(DOC.Parameterizer.HEURISTICS_ID);
+ params.addParameter(DOC.Parameterizer.D_ZERO_ID, 1);
+
+ DOC<DoubleVector> doc = ClassGenericsUtil.parameterizeOrAbort(DOC.class, params);
+ testParameterizationOk(params);
+
+ // run DOC on database
+ Clustering<?> result = doc.run(db);
+ testFMeasure(db, result, .54271816);
+ testClusterSizes(result, new int[] { 1, 20, 33, 40, 56, 104, 274, 322 });
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestDiSHResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSHTest.java
index 7d78b18f..87b38f1d 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestDiSHResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSHTest.java
@@ -45,8 +45,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* @author Elke Achtert
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.3
*/
-public class TestDiSHResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class DiSHTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run DiSH with fixed parameters and compare the result to a golden standard.
*
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestP3C.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/P3CTest.java
index cc8d2e7c..f7a88a83 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestP3C.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/P3CTest.java
@@ -43,8 +43,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* But from visual inspection, this might be a true positive.
*
* @author Erich Schubert
+ * @since 0.3
*/
-public class TestP3C extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class P3CTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run P3C with fixed parameters and compare the result to a golden standard.
*/
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestPROCLUSResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/PROCLUSTest.java
index 61c716a6..75d42b07 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestPROCLUSResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/PROCLUSTest.java
@@ -43,8 +43,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* @author Elke Achtert
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.3
*/
-public class TestPROCLUSResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class PROCLUSTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run PROCLUS with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestPreDeConResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/PreDeConTest.java
index ecd43770..6c9de70a 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestPreDeConResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/PreDeConTest.java
@@ -45,8 +45,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
*
* @author Erich Schubert
* @author Katharina Rausch
+ * @since 0.3
*/
-public class TestPreDeConResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class PreDeConTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run PreDeCon with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestSUBCLUResults.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/SUBCLUTest.java
index 7ae7ecaf..027f906f 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/TestSUBCLUResults.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/SUBCLUTest.java
@@ -44,8 +44,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* @author Elke Achtert
* @author Katharina Rausch
* @author Erich Schubert
+ * @since 0.3
*/
-public class TestSUBCLUResults extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class SUBCLUTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
/**
* Run SUBCLU with fixed parameters and compare the result to a golden
* standard.
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/COPTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/COPTest.java
new file mode 100644
index 00000000..e4d1aaf2
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/COPTest.java
@@ -0,0 +1,108 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.math.linearalgebra.pca.PCAFilteredAutotuningRunner;
+import de.lmu.ifi.dbs.elki.math.linearalgebra.pca.RANSACCovarianceMatrixBuilder;
+import de.lmu.ifi.dbs.elki.math.linearalgebra.pca.WeightedCovarianceMatrixBuilder;
+import de.lmu.ifi.dbs.elki.math.linearalgebra.pca.weightfunctions.ErfcWeight;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Tests the COP algorithm.
+ *
+ * @author Erich Schubert
+ * @since 0.7.1
+ */
+public class COPTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testCOP() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-parabolic.ascii", 530);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(COP.Parameterizer.K_ID, 30);
+
+ // setup Algorithm
+ COP<DoubleVector> cop = ClassGenericsUtil.parameterizeOrAbort(COP.class, params);
+ testParameterizationOk(params);
+
+ OutlierResult result = cop.run(db);
+
+ testAUC(db, "Noise", result, 0.89476666);
+ testSingleScore(result, 416, 0.26795866);
+ }
+
+ @Test
+ public void testCOPRobust() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-parabolic.ascii", 530);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(COP.Parameterizer.K_ID, 30);
+ params.addParameter(COP.Parameterizer.PCARUNNER_ID, PCAFilteredAutotuningRunner.class);
+ params.addParameter(PCAFilteredAutotuningRunner.Parameterizer.PCA_COVARIANCE_MATRIX, WeightedCovarianceMatrixBuilder.class);
+ params.addParameter(WeightedCovarianceMatrixBuilder.Parameterizer.WEIGHT_ID, ErfcWeight.class);
+
+ // setup Algorithm
+ COP<DoubleVector> cop = ClassGenericsUtil.parameterizeOrAbort(COP.class, params);
+ testParameterizationOk(params);
+
+ OutlierResult result = cop.run(db);
+
+ testAUC(db, "Noise", result, 0.90166666);
+ testSingleScore(result, 416, 0.25705955);
+ }
+
+
+ @Test
+ public void testCOPRANSAC() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-parabolic.ascii", 530);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(COP.Parameterizer.K_ID, 30);
+ params.addParameter(COP.Parameterizer.PCARUNNER_ID, PCAFilteredAutotuningRunner.class);
+ params.addParameter(PCAFilteredAutotuningRunner.Parameterizer.PCA_COVARIANCE_MATRIX, RANSACCovarianceMatrixBuilder.class);
+ params.addParameter(RANSACCovarianceMatrixBuilder.Parameterizer.ITER_ID, 25);
+ params.addParameter(RANSACCovarianceMatrixBuilder.Parameterizer.SEED_ID, 0);
+
+ // setup Algorithm
+ COP<DoubleVector> cop = ClassGenericsUtil.parameterizeOrAbort(COP.class, params);
+ testParameterizationOk(params);
+
+ OutlierResult result = cop.run(db);
+
+ testAUC(db, "Noise", result, 0.89269999);
+ testSingleScore(result, 416, 0.38287932);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/DWOFTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/DWOFTest.java
new file mode 100644
index 00000000..24bf71ca
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/DWOFTest.java
@@ -0,0 +1,60 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Tests the DWOF algorithm.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class DWOFTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testDWOF() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-parabolic.ascii", 530);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(DWOF.Parameterizer.K_ID, 20);
+
+ // setup Algorithm
+ DWOF<DoubleVector> cop = ClassGenericsUtil.parameterizeOrAbort(DWOF.class, params);
+ testParameterizationOk(params);
+
+ OutlierResult result = cop.run(db);
+
+ testAUC(db, "Noise", result, 0.8098666);
+ testSingleScore(result, 416, 6.95226128);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/TestGaussianModel.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/GaussianModelTest.java
index 588222bd..53bb618c 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/TestGaussianModel.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/GaussianModelTest.java
@@ -37,8 +37,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the GaussianModel algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestGaussianModel extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class GaussianModelTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testGaussianModel() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-fire.ascii", 1025);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/TestGaussianUniformMixture.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/GaussianUniformMixtureTest.java
index 7c508b27..d42b4324 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/TestGaussianUniformMixture.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/GaussianUniformMixtureTest.java
@@ -37,8 +37,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the GaussianUniformMixture algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestGaussianUniformMixture extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class GaussianUniformMixtureTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testGaussianUniformMixture() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-fire.ascii", 1025);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/TestOPTICSOF.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/OPTICSOFTest.java
index 6e04129e..3feb2450 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/TestOPTICSOF.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/OPTICSOFTest.java
@@ -38,8 +38,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the OPTICS-OF algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestOPTICSOF extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class OPTICSOFTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testOPTICSOF() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-parabolic.ascii", 530);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/SimpleCOPTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/SimpleCOPTest.java
new file mode 100644
index 00000000..effcd9b7
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/SimpleCOPTest.java
@@ -0,0 +1,60 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Tests the SimpleCOP algorithm.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class SimpleCOPTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testSimpleCOP() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-parabolic.ascii", 530);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(SimpleCOP.Parameterizer.K_ID, 50);
+
+ // setup Algorithm
+ SimpleCOP<DoubleVector> cop = ClassGenericsUtil.parameterizeOrAbort(SimpleCOP.class, params);
+ testParameterizationOk(params);
+
+ OutlierResult result = cop.run(db);
+
+ testAUC(db, "Noise", result, 0.833);
+ testSingleScore(result, 416, 0.);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/TestABOD.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/ABODTest.java
index 00f93cfc..a216dade 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/TestABOD.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/ABODTest.java
@@ -39,8 +39,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Note: we don't implement JUnit4Test, as this test is slow.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestABOD extends AbstractSimpleAlgorithmTest {
+public class ABODTest extends AbstractSimpleAlgorithmTest {
@Test
public void testABOD() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/TestFastABOD.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/FastABODTest.java
index 6598c70d..ede44a57 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/TestFastABOD.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/FastABODTest.java
@@ -37,8 +37,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the ABOD algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestFastABOD extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class FastABODTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testFastABOD() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/TestLBABOD.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/LBABODTest.java
index 4b5b6920..aa5dc9ba 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/TestLBABOD.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/anglebased/LBABODTest.java
@@ -40,8 +40,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Note: we don't implement JUnit4Test, as this test is slow.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestLBABOD extends AbstractSimpleAlgorithmTest {
+public class LBABODTest extends AbstractSimpleAlgorithmTest {
@Test
public void testLBABOD() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/clustering/EMOutlierTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/clustering/EMOutlierTest.java
new file mode 100644
index 00000000..590a7c29
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/clustering/EMOutlierTest.java
@@ -0,0 +1,63 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier.clustering;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.em.EM;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeans;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Tests the EM outlier detection algorithm.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class EMOutlierTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testEMOutlierDetection() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-parabolic.ascii", 530);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(EM.Parameterizer.K_ID, 5);
+ params.addParameter(KMeans.SEED_ID, 0);
+
+ // setup Algorithm
+ EMOutlier<DoubleVector> silout = ClassGenericsUtil.parameterizeOrAbort(EMOutlier.class, params);
+ testParameterizationOk(params);
+
+ OutlierResult result = silout.run(db);
+
+ testAUC(db, "Noise", result, 0.54073333);
+ testSingleScore(result, 416, 0.00240242);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/clustering/KMeansOutlierDetectionTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/clustering/KMeansOutlierDetectionTest.java
new file mode 100644
index 00000000..8a40130a
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/clustering/KMeansOutlierDetectionTest.java
@@ -0,0 +1,64 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier.clustering;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeansHamerly;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Tests the KMeans outlier detection algorithm.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class KMeansOutlierDetectionTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testKMeansOutlierDetection() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-parabolic.ascii", 530);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KMeansOutlierDetection.Parameterizer.CLUSTERING_ID, KMeansHamerly.class);
+ params.addParameter(KMeans.K_ID, 10);
+ params.addParameter(KMeans.SEED_ID, 0);
+
+ // setup Algorithm
+ KMeansOutlierDetection<DoubleVector> silout = ClassGenericsUtil.parameterizeOrAbort(KMeansOutlierDetection.class, params);
+ testParameterizationOk(params);
+
+ OutlierResult result = silout.run(db);
+
+ testAUC(db, "Noise", result, 0.86166666);
+ testSingleScore(result, 416, 0.01025466);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/clustering/SilhouetteOutlierDetectionTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/clustering/SilhouetteOutlierDetectionTest.java
new file mode 100644
index 00000000..0b43e532
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/clustering/SilhouetteOutlierDetectionTest.java
@@ -0,0 +1,64 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier.clustering;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeans;
+import de.lmu.ifi.dbs.elki.algorithm.clustering.kmeans.KMeansHamerly;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Tests the Silhouette outlier detection algorithm.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class SilhouetteOutlierDetectionTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testSilhouetteOutlierDetection() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-parabolic.ascii", 530);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(SilhouetteOutlierDetection.Parameterizer.CLUSTERING_ID, KMeansHamerly.class);
+ params.addParameter(KMeans.K_ID, 10);
+ params.addParameter(KMeans.SEED_ID, 0);
+
+ // setup Algorithm
+ SilhouetteOutlierDetection<DoubleVector> silout = ClassGenericsUtil.parameterizeOrAbort(SilhouetteOutlierDetection.class, params);
+ testParameterizationOk(params);
+
+ OutlierResult result = silout.run(db);
+
+ testAUC(db, "Noise", result, 0.71993333);
+ testSingleScore(result, 416, 0.47335776);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestDBOutlierDetection.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/DBOutlierDetectionTest.java
index 1c19366c..69ffff7d 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestDBOutlierDetection.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/DBOutlierDetectionTest.java
@@ -38,8 +38,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the DBOutlierDetection algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestDBOutlierDetection extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class DBOutlierDetectionTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testDBOutlierDetection() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-fire.ascii", 1025);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestDBOutlierScore.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/DBOutlierScoreTest.java
index 47fd73bf..cb70cabe 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestDBOutlierScore.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/DBOutlierScoreTest.java
@@ -38,8 +38,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the DBOutlierScore algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestDBOutlierScore extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class DBOutlierScoreTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testDBOutlierScore() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-fire.ascii", 1025);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/HilOutTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/HilOutTest.java
new file mode 100644
index 00000000..e1cd3a53
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/HilOutTest.java
@@ -0,0 +1,62 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier.distance;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Tests the KNNWeightOutlier algorithm.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class HilOutTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testHilOut() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(HilOut.Parameterizer.K_ID, 4);
+ params.addParameter(HilOut.Parameterizer.N_ID, 200);
+
+ // setup Algorithm
+ HilOut<DoubleVector> hilout = ClassGenericsUtil.parameterizeOrAbort(HilOut.class, params);
+ testParameterizationOk(params);
+
+ // run KNNWeightOutlier on database
+ OutlierResult result = hilout.run(db);
+
+ testAUC(db, "Noise", result, 0.985398148);
+ testSingleScore(result, 945, 1.70927657);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestKNNOutlier.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/KNNOutlierTest.java
index b7ac1bd8..2720ff28 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestKNNOutlier.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/KNNOutlierTest.java
@@ -38,8 +38,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the KNNOutlier algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestKNNOutlier extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class KNNOutlierTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testKNNOutlier() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestKNNWeightOutlier.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/KNNWeightOutlierTest.java
index 73f5db45..cb72b9d7 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestKNNWeightOutlier.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/KNNWeightOutlierTest.java
@@ -38,8 +38,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the KNNWeightOutlier algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestKNNWeightOutlier extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class KNNWeightOutlierTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testKNNWeightOutlier() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestLocalIsolationCoefficient.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/LocalIsolationCoefficientTest.java
index c49beb5f..f781ed28 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestLocalIsolationCoefficient.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/LocalIsolationCoefficientTest.java
@@ -37,8 +37,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the LocalIsolationCoefficient algorithm.
*
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestLocalIsolationCoefficient extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class LocalIsolationCoefficientTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testLocalIsolationCoefficient() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/ODINTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/ODINTest.java
new file mode 100644
index 00000000..1186bcac
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/ODINTest.java
@@ -0,0 +1,61 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier.distance;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Tests the ODIN algorithm.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class ODINTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testODIN() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(ODIN.Parameterizer.K_ID, 10);
+
+ // setup Algorithm
+ ODIN<DoubleVector> odin = ClassGenericsUtil.parameterizeOrAbort(ODIN.class, params);
+ testParameterizationOk(params);
+
+ // run KNNOutlier on database
+ OutlierResult result = odin.run(db);
+
+ testSingleScore(result, 945, 0.7);
+ testAUC(db, "Noise", result, 0.9142037037);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/ReferenceBasedOutlierDetectionTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/ReferenceBasedOutlierDetectionTest.java
new file mode 100644
index 00000000..d9b96d09
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/ReferenceBasedOutlierDetectionTest.java
@@ -0,0 +1,151 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier.distance;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+import de.lmu.ifi.dbs.elki.utilities.referencepoints.AxisBasedReferencePoints;
+import de.lmu.ifi.dbs.elki.utilities.referencepoints.GridBasedReferencePoints;
+import de.lmu.ifi.dbs.elki.utilities.referencepoints.RandomGeneratedReferencePoints;
+import de.lmu.ifi.dbs.elki.utilities.referencepoints.RandomSampleReferencePoints;
+import de.lmu.ifi.dbs.elki.utilities.referencepoints.StarBasedReferencePoints;
+
+/**
+ * Tests the ReferenceBasedOutlierDetection algorithm.
+ *
+ * @author Lucia Cichella
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class ReferenceBasedOutlierDetectionTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testReferenceBasedOutlierDetection() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(ReferenceBasedOutlierDetection.Parameterizer.K_ID, 11);
+ params.addParameter(GridBasedReferencePoints.Parameterizer.GRID_ID, 3);
+
+ // setup Algorithm
+ ReferenceBasedOutlierDetection referenceBasedOutlierDetection = ClassGenericsUtil.parameterizeOrAbort(ReferenceBasedOutlierDetection.class, params);
+ testParameterizationOk(params);
+
+ // run ReferenceBasedOutlierDetection on database
+ OutlierResult result = referenceBasedOutlierDetection.run(db);
+
+ testAUC(db, "Noise", result, 0.9693703703703);
+ testSingleScore(result, 945, 0.933574455);
+ }
+
+ @Test
+ public void testReferenceBasedOutlierDetectionStar() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(ReferenceBasedOutlierDetection.Parameterizer.K_ID, 11);
+ params.addParameter(ReferenceBasedOutlierDetection.Parameterizer.REFP_ID, StarBasedReferencePoints.class);
+
+ // setup Algorithm
+ ReferenceBasedOutlierDetection referenceBasedOutlierDetection = ClassGenericsUtil.parameterizeOrAbort(ReferenceBasedOutlierDetection.class, params);
+ testParameterizationOk(params);
+
+ // run ReferenceBasedOutlierDetection on database
+ OutlierResult result = referenceBasedOutlierDetection.run(db);
+
+ testAUC(db, "Noise", result, 0.910722222);
+ testSingleScore(result, 945, 0.920950222);
+ }
+
+ @Test
+ public void testReferenceBasedOutlierDetectionAxis() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(ReferenceBasedOutlierDetection.Parameterizer.K_ID, 11);
+ params.addParameter(ReferenceBasedOutlierDetection.Parameterizer.REFP_ID, AxisBasedReferencePoints.class);
+
+ // setup Algorithm
+ ReferenceBasedOutlierDetection referenceBasedOutlierDetection = ClassGenericsUtil.parameterizeOrAbort(ReferenceBasedOutlierDetection.class, params);
+ testParameterizationOk(params);
+
+ // run ReferenceBasedOutlierDetection on database
+ OutlierResult result = referenceBasedOutlierDetection.run(db);
+
+ testAUC(db, "Noise", result, 0.8110555);
+ testSingleScore(result, 945, 0.9523053);
+ }
+
+ @Test
+ public void testReferenceBasedOutlierDetectionGenerated() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(ReferenceBasedOutlierDetection.Parameterizer.K_ID, 11);
+ params.addParameter(ReferenceBasedOutlierDetection.Parameterizer.REFP_ID, RandomGeneratedReferencePoints.class);
+ params.addParameter(RandomGeneratedReferencePoints.Parameterizer.N_ID, 15);
+ params.addParameter(RandomGeneratedReferencePoints.Parameterizer.RANDOM_ID, 0);
+
+ // setup Algorithm
+ ReferenceBasedOutlierDetection referenceBasedOutlierDetection = ClassGenericsUtil.parameterizeOrAbort(ReferenceBasedOutlierDetection.class, params);
+ testParameterizationOk(params);
+
+ // run ReferenceBasedOutlierDetection on database
+ OutlierResult result = referenceBasedOutlierDetection.run(db);
+
+ testAUC(db, "Noise", result, 0.817407407);
+ testSingleScore(result, 945, 0.911353060);
+ }
+
+ @Test
+ public void testReferenceBasedOutlierDetectionSample() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(ReferenceBasedOutlierDetection.Parameterizer.K_ID, 11);
+ params.addParameter(ReferenceBasedOutlierDetection.Parameterizer.REFP_ID, RandomSampleReferencePoints.class);
+ params.addParameter(RandomSampleReferencePoints.Parameterizer.N_ID, 15);
+ params.addParameter(RandomSampleReferencePoints.Parameterizer.RANDOM_ID, 0);
+
+ // setup Algorithm
+ ReferenceBasedOutlierDetection referenceBasedOutlierDetection = ClassGenericsUtil.parameterizeOrAbort(ReferenceBasedOutlierDetection.class, params);
+ testParameterizationOk(params);
+
+ // run ReferenceBasedOutlierDetection on database
+ OutlierResult result = referenceBasedOutlierDetection.run(db);
+
+ testAUC(db, "Noise", result, 0.848472222);
+ testSingleScore(result, 945, 0.894389944);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestReferenceBasedOutlierDetection.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestReferenceBasedOutlierDetection.java
deleted file mode 100644
index de0991d0..00000000
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/TestReferenceBasedOutlierDetection.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package de.lmu.ifi.dbs.elki.algorithm.outlier.distance;
-
-/*
- This file is part of ELKI:
- Environment for Developing KDD-Applications Supported by Index-Structures
-
- Copyright (C) 2015
- Ludwig-Maximilians-Universität München
- Lehr- und Forschungseinheit für Datenbanksysteme
- ELKI Development Team
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-import org.junit.Test;
-
-import de.lmu.ifi.dbs.elki.JUnit4Test;
-import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
-import de.lmu.ifi.dbs.elki.database.Database;
-import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
-import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
-import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
-import de.lmu.ifi.dbs.elki.utilities.referencepoints.GridBasedReferencePoints;
-
-/**
- * Tests the ReferenceBasedOutlierDetection algorithm.
- *
- * @author Lucia Cichella
- */
-public class TestReferenceBasedOutlierDetection extends AbstractSimpleAlgorithmTest implements JUnit4Test {
- @Test
- public void testReferenceBasedOutlierDetection() {
- Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
-
- // Parameterization
- ListParameterization params = new ListParameterization();
- params.addParameter(ReferenceBasedOutlierDetection.Parameterizer.K_ID, 11);
- params.addParameter(GridBasedReferencePoints.Parameterizer.GRID_ID, 3);
-
- // setup Algorithm
- ReferenceBasedOutlierDetection referenceBasedOutlierDetection = ClassGenericsUtil.parameterizeOrAbort(ReferenceBasedOutlierDetection.class, params);
- testParameterizationOk(params);
-
- // run ReferenceBasedOutlierDetection on database
- OutlierResult result = referenceBasedOutlierDetection.run(db);
-
- testAUC(db, "Noise", result, 0.9418148148);
- testSingleScore(result, 945, 0.87173403699);
- }
-} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/parallel/TestParallelKNNOutlier.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/parallel/ParallelKNNOutlierTest.java
index 3dfe5664..455f5730 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/parallel/TestParallelKNNOutlier.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/parallel/ParallelKNNOutlierTest.java
@@ -38,8 +38,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the KNNOutlier algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestParallelKNNOutlier extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class ParallelKNNOutlierTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testKNNOutlier() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/parallel/TestParallelKNNWeightOutlier.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/parallel/ParallelKNNWeightOutlierTest.java
index 7391bfed..1c298214 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/parallel/TestParallelKNNWeightOutlier.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/distance/parallel/ParallelKNNWeightOutlierTest.java
@@ -38,8 +38,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the KNNWeightOutlier algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestParallelKNNWeightOutlier extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class ParallelKNNWeightOutlierTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testKNNWeightOutlier() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/ALOCITest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/ALOCITest.java
new file mode 100644
index 00000000..378f8477
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/ALOCITest.java
@@ -0,0 +1,62 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier.lof;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Tests the ALOCI algorithm.
+ *
+ * @author Lucia Cichella
+ * @since 0.4.0
+ */
+public class ALOCITest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testLOCI() {
+ Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(ALOCI.Parameterizer.SEED_ID, 0);
+ params.addParameter(ALOCI.Parameterizer.GRIDS_ID, 3);
+
+ // setup Algorithm
+ ALOCI<DoubleVector> aloci = ClassGenericsUtil.parameterizeOrAbort(ALOCI.class, params);
+ testParameterizationOk(params);
+
+ // run LOCI on database
+ OutlierResult result = aloci.run(db);
+
+ testAUC(db, "Noise", result, 0.77011111);
+ testSingleScore(result, 146, 1.1242238186577);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/COFTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/COFTest.java
new file mode 100644
index 00000000..eac2f982
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/COFTest.java
@@ -0,0 +1,61 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier.lof;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Tests the COF algorithm.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class COFTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testCOF() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-axis-subspaces-6d.ascii", 1345);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(COF.Parameterizer.K_ID, 10);
+
+ // setup Algorithm
+ COF<DoubleVector> cof = ClassGenericsUtil.parameterizeOrAbort(COF.class, params);
+ testParameterizationOk(params);
+
+ // run COF on database
+ OutlierResult result = cof.run(db);
+
+ testSingleScore(result, 1293, 1.415457);
+ testAUC(db, "Noise", result, 0.8696806);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/FlexibleLOFTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/FlexibleLOFTest.java
new file mode 100644
index 00000000..c4165a00
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/FlexibleLOFTest.java
@@ -0,0 +1,61 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier.lof;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Tests the LOF algorithm.
+ *
+ * @author Lucia Cichella
+ * @since 0.4.0
+ */
+public class FlexibleLOFTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testFlexibleLOF() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-axis-subspaces-6d.ascii", 1345);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(FlexibleLOF.Parameterizer.KREF_ID, 10);
+
+ // setup Algorithm
+ FlexibleLOF<DoubleVector> flof = ClassGenericsUtil.parameterizeOrAbort(FlexibleLOF.class, params);
+ testParameterizationOk(params);
+
+ // run LOF on database
+ OutlierResult result = flof.run(db);
+
+ testSingleScore(result, 1293, 1.1945314199156365);
+ testAUC(db, "Noise", result, 0.8921680672268908);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestINFLO.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/INFLOTest.java
index 866effa6..d6c01b2a 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestINFLO.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/INFLOTest.java
@@ -37,8 +37,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the INFLO algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestINFLO extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class INFLOTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testINFLO() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/KDEOSTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/KDEOSTest.java
new file mode 100644
index 00000000..096e3aa6
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/KDEOSTest.java
@@ -0,0 +1,65 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier.lof;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.math.statistics.kernelfunctions.EpanechnikovKernelDensityFunction;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Tests the KDEOS algorithm.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class KDEOSTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testKDEOS() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-axis-subspaces-6d.ascii", 1345);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(KDEOS.Parameterizer.KERNEL_ID, EpanechnikovKernelDensityFunction.class);
+ params.addParameter(KDEOS.Parameterizer.KMIN_ID, 5);
+ params.addParameter(KDEOS.Parameterizer.KMAX_ID, 20);
+ params.addParameter(KDEOS.Parameterizer.KERNEL_SCALE_ID, 1.0);
+
+ // setup Algorithm
+ KDEOS<DoubleVector> kdeos = ClassGenericsUtil.parameterizeOrAbort(KDEOS.class, params);
+ testParameterizationOk(params);
+
+ // run LOF on database
+ OutlierResult result = kdeos.run(db);
+
+ testAUC(db, "Noise", result, 0.7983529411764);
+ testSingleScore(result, 1293, 0.8788346606616);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDFTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDFTest.java
new file mode 100644
index 00000000..c724598b
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDFTest.java
@@ -0,0 +1,62 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier.lof;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Tests the LDF algorithm.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class LDFTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testLDF() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-axis-subspaces-6d.ascii", 1345);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(LDF.Parameterizer.K_ID, 10);
+ params.addParameter(LDF.Parameterizer.H_ID, 1);
+
+ // setup Algorithm
+ LDF<DoubleVector> ldf = ClassGenericsUtil.parameterizeOrAbort(LDF.class, params);
+ testParameterizationOk(params);
+
+ // run LDF on database
+ OutlierResult result = ldf.run(db);
+
+ testSingleScore(result, 1293, 3.158819);
+ testAUC(db, "Noise", result, 0.9127619);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestLDOF.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDOFTest.java
index c728e38e..8eb45790 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestLDOF.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LDOFTest.java
@@ -37,8 +37,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the LDOF algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestLDOF extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class LDOFTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testLDOF() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-fire.ascii", 1025);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestLOCI.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LOCITest.java
index a2934701..2438f6cb 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestLOCI.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LOCITest.java
@@ -35,17 +35,18 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
/**
* Tests the LOCI algorithm.
- *
+ *
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestLOCI extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class LOCITest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testLOCI() {
Database db = makeSimpleDatabase(UNITTEST + "3clusters-and-noise-2d.csv", 330);
// Parameterization
ListParameterization params = new ListParameterization();
- params.addParameter(LOCI.RMAX_ID, 0.5);
+ params.addParameter(LOCI.Parameterizer.RMAX_ID, 0.5);
// setup Algorithm
LOCI<DoubleVector> loci = ClassGenericsUtil.parameterizeOrAbort(LOCI.class, params);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestLOF.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LOFTest.java
index d54d760e..33ab6d2d 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestLOF.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LOFTest.java
@@ -37,8 +37,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the LOF algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestLOF extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class LOFTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testLOF() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-axis-subspaces-6d.ascii", 1345);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestLoOP.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LoOPTest.java
index 60dddb5d..110c02bd 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestLoOP.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/LoOPTest.java
@@ -37,8 +37,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the LoOP algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestLoOP extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class LoOPTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testLoOP() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestOnlineLOF.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/OnlineLOFTest.java
index f5fda922..947d6fcf 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestOnlineLOF.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/OnlineLOFTest.java
@@ -63,9 +63,10 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* BUG: This currently does not appear to work correctly!
*
* @author Elke Achtert
+ * @since 0.4.0
*/
@Ignore
-public class TestOnlineLOF implements JUnit4Test {
+public class OnlineLOFTest implements JUnit4Test {
// the following values depend on the data set used!
static String dataset = "data/testdata/unittests/3clusters-and-noise-2d.csv";
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimpleKernelDensityLOFTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimpleKernelDensityLOFTest.java
new file mode 100644
index 00000000..19223930
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimpleKernelDensityLOFTest.java
@@ -0,0 +1,63 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier.lof;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.math.statistics.kernelfunctions.BiweightKernelDensityFunction;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Tests the SimpleKernelDensityLOF algorithm.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class SimpleKernelDensityLOFTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testLDF() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-axis-subspaces-6d.ascii", 1345);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(LOF.Parameterizer.K_ID, 20);
+ params.addParameter(SimpleKernelDensityLOF.Parameterizer.KERNEL_ID, BiweightKernelDensityFunction.class);
+
+ // setup Algorithm
+ SimpleKernelDensityLOF<DoubleVector> klof = ClassGenericsUtil.parameterizeOrAbort(SimpleKernelDensityLOF.class, params);
+ testParameterizationOk(params);
+
+ // run LDF on database
+ OutlierResult result = klof.run(db);
+
+ testAUC(db, "Noise", result, 0.87192156);
+ testSingleScore(result, 1293, 12.271188);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestSimplifiedLOF.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimplifiedLOFTest.java
index 3ef40851..851bb5d6 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestSimplifiedLOF.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/SimplifiedLOFTest.java
@@ -37,8 +37,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the LOF algorithm.
*
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestSimplifiedLOF extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class SimplifiedLOFTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testSimplifiedLOF() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-axis-subspaces-6d.ascii", 1345);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestVarianceOfVolume.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/VarianceOfVolumeTest.java
index 266e9f35..3cbe5b78 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/TestVarianceOfVolume.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/VarianceOfVolumeTest.java
@@ -37,8 +37,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the Variance of Volume algorithm.
*
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestVarianceOfVolume extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class VarianceOfVolumeTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testVOV() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-axis-subspaces-6d.ascii", 1345);
@@ -54,7 +55,7 @@ public class TestVarianceOfVolume extends AbstractSimpleAlgorithmTest implements
// run LOF on database
OutlierResult result = lof.run(db);
- testSingleScore(result, 1293, 848349.0186);
- testAUC(db, "Noise", result, 0.936448179271);
+ testSingleScore(result, 1293, 2.0733100852601836e13);
+ testAUC(db, "Noise", result, 0.9306946778);
}
} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelLOFTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelLOFTest.java
new file mode 100644
index 00000000..7dcd568a
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelLOFTest.java
@@ -0,0 +1,62 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier.lof.parallel;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.algorithm.outlier.lof.LOF;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Regression tests the ParallelLOF algorithm.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class ParallelLOFTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testParallelLOF() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-axis-subspaces-6d.ascii", 1345);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(LOF.Parameterizer.K_ID, 10);
+
+ // setup Algorithm
+ ParallelLOF<DoubleVector> lof = ClassGenericsUtil.parameterizeOrAbort(ParallelLOF.class, params);
+ testParameterizationOk(params);
+
+ // run ParallelLOF on database
+ OutlierResult result = lof.run(db);
+
+ testSingleScore(result, 1293, 1.1945314199156365);
+ testAUC(db, "Noise", result, 0.8921680672268908);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelSimplifiedLOFTest.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelSimplifiedLOFTest.java
new file mode 100644
index 00000000..5bea31e9
--- /dev/null
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/lof/parallel/ParallelSimplifiedLOFTest.java
@@ -0,0 +1,62 @@
+package de.lmu.ifi.dbs.elki.algorithm.outlier.lof.parallel;
+
+/*
+ This file is part of ELKI:
+ Environment for Developing KDD-Applications Supported by Index-Structures
+
+ Copyright (C) 2015
+ Ludwig-Maximilians-Universität München
+ Lehr- und Forschungseinheit für Datenbanksysteme
+ ELKI Development Team
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import org.junit.Test;
+
+import de.lmu.ifi.dbs.elki.JUnit4Test;
+import de.lmu.ifi.dbs.elki.algorithm.AbstractSimpleAlgorithmTest;
+import de.lmu.ifi.dbs.elki.algorithm.outlier.lof.LOF;
+import de.lmu.ifi.dbs.elki.data.DoubleVector;
+import de.lmu.ifi.dbs.elki.database.Database;
+import de.lmu.ifi.dbs.elki.result.outlier.OutlierResult;
+import de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil;
+import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParameterization;
+
+/**
+ * Regression tests the parallel SimplifiedLOF algorithm.
+ *
+ * @author Erich Schubert
+ * @since 0.4.0
+ */
+public class ParallelSimplifiedLOFTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+ @Test
+ public void testParallelSimplifiedLOF() {
+ Database db = makeSimpleDatabase(UNITTEST + "outlier-axis-subspaces-6d.ascii", 1345);
+
+ // Parameterization
+ ListParameterization params = new ListParameterization();
+ params.addParameter(LOF.Parameterizer.K_ID, 10);
+
+ // setup Algorithm
+ ParallelSimplifiedLOF<DoubleVector> lof = ClassGenericsUtil.parameterizeOrAbort(ParallelSimplifiedLOF.class, params);
+ testParameterizationOk(params);
+
+ // run LOF on database
+ OutlierResult result = lof.run(db);
+
+ testAUC(db, "Noise", result, 0.8892549019);
+ testSingleScore(result, 1293, 1.3025894);
+ }
+} \ No newline at end of file
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/TestFeatureBagging.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/FeatureBaggingTest.java
index 91f20b28..b5fd84be 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/TestFeatureBagging.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/FeatureBaggingTest.java
@@ -37,8 +37,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the Feature Bagging algorithm.
*
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestFeatureBagging extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class FeatureBaggingTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testFeatureBaggingSum() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-axis-subspaces-6d.ascii", 1345);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/TestHiCS.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/HiCSTest.java
index bb10269d..cfa904dc 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/TestHiCS.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/meta/HiCSTest.java
@@ -40,8 +40,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the HiCS algorithm.
*
* @author Erich Schubert
+ * @since 0.4.0
*/
-public class TestHiCS extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class HiCSTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testHiCSKS() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-axis-subspaces-6d.ascii", 1345);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/TestAggarwalYuEvolutionary.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/AggarwalYuEvolutionaryTest.java
index 67168d3f..2961d6e7 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/TestAggarwalYuEvolutionary.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/AggarwalYuEvolutionaryTest.java
@@ -38,8 +38,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the AggarwalYuEvolutionary algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestAggarwalYuEvolutionary extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class AggarwalYuEvolutionaryTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testAggarwalYuEvolutionary() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/TestAggarwalYuNaive.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/AggarwalYuNaiveTest.java
index 8ecdbe26..6e3eeb5d 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/TestAggarwalYuNaive.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/AggarwalYuNaiveTest.java
@@ -38,8 +38,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the AggarwalYuNaive algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestAggarwalYuNaive extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class AggarwalYuNaiveTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testAggarwalYuNaive() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-3d-3clusters.ascii", 960);
diff --git a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/TestSOD.java b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/SODTest.java
index d55f3f41..d7fee573 100644
--- a/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/TestSOD.java
+++ b/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/outlier/subspace/SODTest.java
@@ -38,8 +38,9 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.ListParamet
* Tests the SOD algorithm.
*
* @author Lucia Cichella
+ * @since 0.4.0
*/
-public class TestSOD extends AbstractSimpleAlgorithmTest implements JUnit4Test {
+public class SODTest extends AbstractSimpleAlgorithmTest implements JUnit4Test {
@Test
public void testSOD() {
Database db = makeSimpleDatabase(UNITTEST + "outlier-axis-subspaces-6d.ascii", 1345);