Examples of MeanShiftCanopyDriver


Examples of org.apache.mahout.clustering.meanshift.MeanShiftCanopyDriver

  @Test
  public void testMeanShift() throws Exception {
    ClusteringTestUtils.writePointsToFile(sampleData, getTestTempFilePath("testdata/file1"), fs, conf);
    DistanceMeasure measure = new EuclideanDistanceMeasure();
    new MeanShiftCanopyDriver().run(conf, testdata, output, measure, 2.1, 1.0, 0.001, 10, false, true, true);
    int numIterations = 10;
    Path clustersIn = new Path(output, "clusters-2");
    RepresentativePointsDriver.run(conf, clustersIn, new Path(output, "clusteredPoints"), output, measure, numIterations, true);
    CDbwEvaluator evaluator = new CDbwEvaluator(conf, clustersIn);
    //printRepPoints(numIterations);
View Full Code Here

Examples of org.apache.mahout.clustering.meanshift.MeanShiftCanopyDriver

  @Test
  public void testMeanShift() throws Exception {
    ClusteringTestUtils.writePointsToFile(sampleData, new Path(testdata, "file1"), fs, conf);
    DistanceMeasure measure = new EuclideanDistanceMeasure();
    Configuration conf = new Configuration();
    new MeanShiftCanopyDriver().run(conf, testdata, output, measure, 2.1, 1.0, 0.001, 10, false, true, true);
    int numIterations = 10;
    Path clustersIn = new Path(output, "clusters-10");
    RepresentativePointsDriver.run(conf, clustersIn, new Path(output, "clusteredPoints"), output, measure, numIterations, true);
    ClusterEvaluator evaluator = new ClusterEvaluator(conf, clustersIn);
    // now print out the Results
View Full Code Here

Examples of org.apache.mahout.clustering.meanshift.MeanShiftCanopyDriver

  @Test
  public void testMeanShift() throws Exception {
    DistanceMeasure measure = new CosineDistanceMeasure();
    Path output = getTestTempDirPath("output");
    Configuration conf = new Configuration();
    new MeanShiftCanopyDriver().run(conf, getTestTempDirPath("testdata"), output, measure, 0.5, 0.01, 0.05, 10, false, true, false);
    // run ClusterDumper
    ClusterDumper clusterDumper = new ClusterDumper(finalClusterPath(conf, output, 10), new Path(output, "clusteredPoints"));
    clusterDumper.printClusters(termDictionary);
  }
View Full Code Here

Examples of org.apache.mahout.clustering.meanshift.MeanShiftCanopyDriver

    RandomUtils.useTestSeed();
    DisplayClustering.generateSamples();
    writeSampleData(samples);
    boolean b = true;
    if (b) {
      new MeanShiftCanopyDriver().run(
          new Configuration(), samples, output, measure, t1, t2, 0.005, 20, false, true, true);
      loadClusters(output);
    } else {
      Collection<Vector> points = new ArrayList<Vector>();
      for (VectorWritable sample : SAMPLE_DATA) {
View Full Code Here

Examples of org.apache.mahout.clustering.meanshift.MeanShiftCanopyDriver

                  double convergenceDelta,
                  int maxIterations)
    throws IOException, InterruptedException, ClassNotFoundException, InstantiationException, IllegalAccessException {
    Path directoryContainingConvertedInput = new Path(output, DIRECTORY_CONTAINING_CONVERTED_INPUT);
    InputDriver.runJob(input, directoryContainingConvertedInput);
    new MeanShiftCanopyDriver().run(conf,
                                    directoryContainingConvertedInput,
                                    output,
                                    measure,
                                    t1,
                                    t2,
View Full Code Here

Examples of org.apache.mahout.clustering.meanshift.MeanShiftCanopyDriver

    RandomUtils.useTestSeed();
    DisplayClustering.generateSamples();
    writeSampleData(samples);
    //boolean b = true;
    //if (b) {
    new MeanShiftCanopyDriver().run(conf, samples, output, measure, t1, t2, 0.005, 20, false, true, true);
    loadClusters(output);
    //} else {
    //  Collection<Vector> points = new ArrayList<Vector>();
    //  for (VectorWritable sample : SAMPLE_DATA) {
    //    points.add(sample.get());
View Full Code Here

Examples of org.apache.mahout.clustering.meanshift.MeanShiftCanopyDriver

                  double convergenceDelta,
                  int maxIterations)
    throws IOException, InterruptedException, ClassNotFoundException {
    Path directoryContainingConvertedInput = new Path(output, DIRECTORY_CONTAINING_CONVERTED_INPUT);
    InputDriver.runJob(input, directoryContainingConvertedInput);
    new MeanShiftCanopyDriver().run(conf,
                                    directoryContainingConvertedInput,
                                    output,
                                    measure,
                                    t1,
                                    t2,
View Full Code Here

Examples of org.apache.mahout.clustering.meanshift.MeanShiftCanopyDriver

  @Test
  public void testMeanShift() throws Exception {
    ClusteringTestUtils.writePointsToFile(sampleData, new Path(testdata, "file1"), fs, conf);
    DistanceMeasure measure = new EuclideanDistanceMeasure();
    Configuration conf = new Configuration();
    new MeanShiftCanopyDriver().run(conf, testdata, output, measure, 2.1, 1.0, 0.001, 10, false, true, true);
    int numIterations = 10;
    Path clustersIn = new Path(output, "clusters-10");
    RepresentativePointsDriver.run(conf, clustersIn, new Path(output, "clusteredPoints"), output, measure, numIterations, true);
    ClusterEvaluator evaluator = new ClusterEvaluator(conf, clustersIn);
    // now print out the Results
View Full Code Here

Examples of org.apache.mahout.clustering.meanshift.MeanShiftCanopyDriver

  @Test
  public void testMeanShift() throws Exception {
    ClusteringTestUtils.writePointsToFile(sampleData, getTestTempFilePath("testdata/file1"), fs, conf);
    DistanceMeasure measure = new EuclideanDistanceMeasure();
    new MeanShiftCanopyDriver().run(conf, testdata, output, measure, 2.1, 1.0, 0.001, 10, false, true, true);
    int numIterations = 10;
    Path clustersIn = new Path(output, "clusters-2");
    RepresentativePointsDriver.run(conf, clustersIn, new Path(output, "clusteredPoints"), output, measure, numIterations, true);
    CDbwEvaluator evaluator = new CDbwEvaluator(conf, clustersIn);
    //printRepPoints(numIterations);
View Full Code Here

Examples of org.apache.mahout.clustering.meanshift.MeanShiftCanopyDriver

  @Test
  public void testMeanShift() throws Exception {
    DistanceMeasure measure = new CosineDistanceMeasure();
    Path output = getTestTempDirPath("output");
    Configuration conf = new Configuration();
    new MeanShiftCanopyDriver().run(conf, getTestTempDirPath("testdata"), output, measure, 0.5, 0.01, 0.05, 10, false, true, true);
    // run ClusterDumper
    ClusterDumper clusterDumper = new ClusterDumper(finalClusterPath(conf, output, 10), new Path(output, "clusteredPoints"));
    clusterDumper.printClusters(termDictionary);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.