@@ -0,0 +1,2065 @@
+/*%0A * This file is part of ELKI:%0A * Environment for Developing KDD-Applications Supported by Index-Structures%0A *%0A * Copyright (C) 2017%0A * ELKI Development Team%0A *%0A * This program is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU Affero General Public License as published by%0A * the Free Software Foundation, either version 3 of the License, or%0A * (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the%0A * GNU Affero General Public License for more details.%0A *%0A * You should have received a copy of the GNU Affero General Public License%0A * along with this program. If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0Apackage de.lmu.ifi.dbs.elki.algorithm.clustering.hierarchical.extraction;%0A%0Aimport org.junit.Test;%0A%0Aimport de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm;%0Aimport de.lmu.ifi.dbs.elki.algorithm.clustering.AbstractClusterAlgorithmTest;%0Aimport de.lmu.ifi.dbs.elki.algorithm.clustering.hierarchical.AnderbergHierarchicalClustering;%0Aimport de.lmu.ifi.dbs.elki.data.Clustering;%0Aimport de.lmu.ifi.dbs.elki.database.Database;%0Aimport de.lmu.ifi.dbs.elki.utilities.ELKIBuilder;%0A%0A/**%0A * Regression test for k clusters with minsize extraction.%0A *%0A * @author Erich Schubert%0A */%0Apublic class ClustersWithNoiseExtractionTest extends AbstractClusterAlgorithmTest %7B%0A  @Test%0A  public void testClustering() %7B%0A    Database db = makeSimpleDatabase(UNITTEST + %223clusters-and-noise-2d.csv%22, 330);%0A    Clustering%3C?%3E clustering = new ELKIBuilder%3C%3E(ClustersWithNoiseExtraction.class) //%0A        .with(ClustersWithNoiseExtraction.Parameterizer.K_ID, 3) //%0A        .with(ClustersWithNoiseExtraction.Parameterizer.MINCLUSTERSIZE_ID, 5) //%0A        .with(AbstractAlgorithm.ALGORITHM_ID, AnderbergHierarchicalClustering.class) //%0A        .build().run(db);%0A    testFMeasure(db, clustering, 0.9242);%0A    testClusterSizes(clustering, new int%5B%5D %7B 56, 123, 151 %7D);%0A  %7D%0A%7D%0A

Test for the new cluster extraction method.