Package org.apache.mahout.utils.clustering

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


    Configuration conf = new Configuration();
    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


    Configuration conf = new Configuration();
    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

    // now run the KMeans job
    KMeansDriver.run(svdData, new Path(output, "clusters-0"), output, measure, 0.001, 10, true, true);
    // run ClusterDumper
    ClusterDumper clusterDumper =
        new ClusterDumper(finalClusterPath(conf, output, 10), new Path(output, "clusteredPoints"));
    clusterDumper.printClusters(termDictionary);
  }

  //@Test
  public void testKmeansDSVD() throws Exception {
    DistanceMeasure measure = new EuclideanDistanceMeasure();
View Full Code Here

    // now run the KMeans job
    KMeansDriver.run(sData.getRowPath(), new Path(output, "clusters-0"), output, measure, 0.001, 10, true, true);
    // run ClusterDumper
    ClusterDumper clusterDumper =
        new ClusterDumper(finalClusterPath(conf, output, 10), new Path(output, "clusteredPoints"));
    clusterDumper.printClusters(termDictionary);
  }

  //@Test
  public void testKmeansDSVD2() throws Exception {
    DistanceMeasure measure = new EuclideanDistanceMeasure();
View Full Code Here

    KMeansDriver.run(sData.getRowPath(), new Path(output, "clusters-0"), output, measure,
        0.001, 10, true, true);
    // run ClusterDumper
    ClusterDumper clusterDumper =
        new ClusterDumper(finalClusterPath(conf, output, 10), new Path(output, "clusteredPoints"));
    clusterDumper.printClusters(termDictionary);
  }
}
View Full Code Here

    CanopyDriver.run(new Configuration(), directoryContainingConvertedInput,
        output, measure, t1, t2, true, false);
    // run ClusterDumper
    ClusterDumper clusterDumper = new ClusterDumper(new Path(output,
        "clusters-0"), new Path(output, "clusteredPoints"));
    clusterDumper.printClusters(null);
  }

  @Override
  public int run(String[] args) throws Exception {
View Full Code Here

        Cluster.INITIAL_CLUSTERS_DIR), output, measure, convergenceDelta,
        maxIterations, fuzziness, true, true, 0.0, false);
    // run ClusterDumper
    ClusterDumper clusterDumper = new ClusterDumper(finalClusterPath(conf,
        output, maxIterations), new Path(output, "clusteredPoints"));
    clusterDumper.printClusters(null);
  }
}
View Full Code Here

    CanopyDriver.run(getConfiguration(), 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, 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 testJsonClusterDumper() throws Exception {
    DistanceMeasure measure = new EuclideanDistanceMeasure();
View Full Code Here

        "clusters-0-final"), kmeansOutput, 0.001, 10, true, 0.0, false);
    // run ClusterDumper
    ClusterDumper clusterDumper = new ClusterDumper(finalClusterPath(conf,
        output, 10), new Path(kmeansOutput, "clusteredPoints"));
    clusterDumper.setOutputFormat(ClusterDumper.OUTPUT_FORMAT.JSON);
    clusterDumper.printClusters(termDictionary);
  }
 
  @Test
  public void testFuzzyKmeans() 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.