Package org.apache.mahout.utils.clustering

Examples of org.apache.mahout.utils.clustering.ClusterDumper.printClusters()


        output, "clusters-0-final"), kMeansOutput, 0.001, 10, 1.1f, true,
        true, 0, true);
    // run ClusterDumper
    ClusterDumper clusterDumper = new ClusterDumper(finalClusterPath(conf,
        output, 10), new Path(kMeansOutput, "clusteredPoints"));
    clusterDumper.printClusters(termDictionary);
  }
 
  /*
  @Test
  public void testKmeansSVD() throws Exception {
View Full Code Here


    // run ClusterDumper
    Path outGlob = new Path(output, "clusters-*-final");
    Path clusteredPoints = new Path(output,"clusteredPoints");
    log.info("Dumping out clusters from clusters: {} and clusteredPoints: {}", outGlob, clusteredPoints);
    ClusterDumper clusterDumper = new ClusterDumper(outGlob, clusteredPoints);
    clusterDumper.printClusters(null);
  }
 
  /**
   * Run the kmeans clustering job on an input dataset using the given distance measure, t1, t2 and iteration
   * parameters. All output data will be written to the output directory, which will be initially deleted if it exists.
View Full Code Here

    KMeansDriver.run(conf, directoryContainingConvertedInput, new Path(canopyOutput, Cluster.INITIAL_CLUSTERS_DIR
        + "-final"), output, convergenceDelta, maxIterations, true, 0.0, false);
    // run ClusterDumper
    ClusterDumper clusterDumper = new ClusterDumper(new Path(output, "clusters-*-final"), new Path(output,
        "clusteredPoints"));
    clusterDumper.printClusters(null);
  }
}
View Full Code Here

    log.info("Running FuzzyKMeans");
    FuzzyKMeansDriver.run(directoryContainingConvertedInput, new Path(canopyOutput, "clusters-0-final"), output,
        convergenceDelta, maxIterations, fuzziness, true, true, 0.0, false);
    // run ClusterDumper
    ClusterDumper clusterDumper = new ClusterDumper(new Path(output, "clusters-*-final"), new Path(output, "clusteredPoints"));
    clusterDumper.printClusters(null);
  }
}
View Full Code Here

    CanopyDriver.run(new Configuration(), getTestTempDirPath("testdata"),
        output, measure, 8, 4, true, 0.0, true);
    // run ClusterDumper
    ClusterDumper clusterDumper = new ClusterDumper(new Path(output,
        "clusters-0-final"), new Path(output, "clusteredPoints"));
    clusterDumper.printClusters(termDictionary);
  }
 
  @Test
  public void testKmeans() throws Exception {
    DistanceMeasure measure = new EuclideanDistanceMeasure();
View Full Code Here

  KMeansDriver.run(conf, getTestTempDirPath("testdata"), new Path(output,
        "clusters-0-final"), kmeansOutput, measure, 0.001, 10, true, 0.0, false);
    // run ClusterDumper
    ClusterDumper clusterDumper = new ClusterDumper(finalClusterPath(conf,
        output, 10), new Path(kmeansOutput, "clusteredPoints"));
    clusterDumper.printClusters(termDictionary);
  }
 
  @Test
  public void testFuzzyKmeans() throws Exception {
    DistanceMeasure measure = new EuclideanDistanceMeasure();
View Full Code Here

        output, "clusters-0-final"), kmeansOutput, measure, 0.001, 10, 1.1f, true,
        true, 0, true);
    // run ClusterDumper
    ClusterDumper clusterDumper = new ClusterDumper(finalClusterPath(conf,
        output, 10), new Path(kmeansOutput, "clusteredPoints"));
    clusterDumper.printClusters(termDictionary);
  }
 
  @Test
  public void testMeanShift() throws Exception {
    DistanceMeasure measure = new CosineDistanceMeasure();
View Full Code Here

    MeanShiftCanopyDriver.run(conf, getTestTempDirPath("testdata"), output,
        measure, kernelProfile, 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);
  }
 
  @Test
  public void testDirichlet2() throws Exception {
    Path output = getTestTempDirPath("output");
View Full Code Here

    DirichletDriver.run(conf, getTestTempDirPath("testdata"), output,
        description, 15, 10, 1.0, true, true, 0, true);
    // run ClusterDumper
    ClusterDumper clusterDumper = new ClusterDumper(finalClusterPath(conf,
        output, 10), new Path(output, "clusteredPoints"));
    clusterDumper.printClusters(termDictionary);
  }
 
  @Test
  public void testDirichlet3() throws Exception {
    Path output = getTestTempDirPath("output");
View Full Code Here

    DirichletDriver.run(conf, getTestTempDirPath("testdata"), output,
        description, 15, 10, 1.0, true, true, 0, true);
    // run ClusterDumper
    ClusterDumper clusterDumper = new ClusterDumper(finalClusterPath(conf,
        output, 10), new Path(output, "clusteredPoints"));
    clusterDumper.printClusters(termDictionary);
  }
 
  // @Test
  public void testKmeansSVD() throws Exception {
    DistanceMeasure measure = new EuclideanDistanceMeasure();
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.