@Test public void testVectorClassificationWithoutOutlierRemoval() throws Exception { List<VectorWritable> points = getPointsWritable(REFERENCE); pointsPath = getTestTempDirPath("points"); clusteringOutputPath = getTestTempDirPath("output"); classifiedOutputPath = getTestTempDirPath("classify"); conf = getConfiguration(); ClusteringTestUtils.writePointsToFile(points, new Path(pointsPath, "file1"), fs, conf); runClustering(pointsPath, conf, true); runClassificationWithoutOutlierRemoval(); collectVectorsForAssertion(); assertVectorsWithoutOutlierRemoval(); }
@Test public void testVectorClassificationWithOutlierRemoval() throws Exception { List<VectorWritable> points = getPointsWritable(REFERENCE); pointsPath = getTestTempDirPath("points"); clusteringOutputPath = getTestTempDirPath("output"); classifiedOutputPath = getTestTempDirPath("classify"); conf = getConfiguration(); ClusteringTestUtils.writePointsToFile(points, new Path(pointsPath, "file1"), fs, conf); runClustering(pointsPath, conf, true); runClassificationWithOutlierRemoval(true); collectVectorsForAssertion(); assertVectorsWithOutlierRemoval(); }
@Test public void testVectorClassificationWithOutlierRemovalMR() throws Exception { List<VectorWritable> points = getPointsWritable(REFERENCE); pointsPath = getTestTempDirPath("points"); clusteringOutputPath = getTestTempDirPath("output"); classifiedOutputPath = getTestTempDirPath("classifiedClusters"); HadoopUtil.delete(conf, classifiedOutputPath); conf = getConfiguration(); ClusteringTestUtils.writePointsToFile(points, true, new Path(pointsPath, "file1"), fs, conf); runClustering(pointsPath, conf, false); runClassificationWithOutlierRemoval(false); collectVectorsForAssertion(); assertVectorsWithOutlierRemoval(); }