private void runClassificationWithOutlierRemoval(boolean runSequential) throws IOException, InterruptedException, ClassNotFoundException { ClusterClassificationDriver.run(getConfiguration(), pointsPath, clusteringOutputPath, classifiedOutputPath, 0.73, true, runSequential); }
private void runClassificationWithoutOutlierRemoval() throws IOException, InterruptedException, ClassNotFoundException { ClusterClassificationDriver.run(getConfiguration(), pointsPath, clusteringOutputPath, classifiedOutputPath, 0.0, true, true); }
@Override @Before public void setUp() throws Exception { super.setUp(); Configuration conf = getConfiguration(); fs = FileSystem.get(conf); firstCluster = Lists.newArrayList(); secondCluster = Lists.newArrayList(); thirdCluster = Lists.newArrayList(); }
@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(); }