Package org.apache.mahout.utils.clustering

Examples of org.apache.mahout.utils.clustering.ClusterDumper


    InputDriver.runJob(input, directoryContainingConvertedInput,
        "org.apache.mahout.math.RandomAccessSparseVector");
    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);
  }
View Full Code Here


    log.info("Running FuzzyKMeans");
    FuzzyKMeansDriver.run(directoryContainingConvertedInput, new Path(output,
        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

   
    Path output = getTestTempDirPath("output");
    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);
  }
View Full Code Here

    // now run the KMeans job
    Path kMeansOutput = new Path(output, "kmeans");
    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);
  }
View Full Code Here

    // now run the KMeans job
    Path kmeansOutput = new Path(output, "kmeans");
    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.setOutputFormat(ClusterDumper.OUTPUT_FORMAT.JSON);
    clusterDumper.printClusters(termDictionary);
  }
View Full Code Here

    Path kMeansOutput = new Path(output, "kmeans");
    FuzzyKMeansDriver.run(conf, getTestTempDirPath("testdata"), new Path(
        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);
  }
View Full Code Here

        maxIterations, true, 0.0, false);
    // 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);
  }
View Full Code Here

        false);
    log.info("Running KMeans");
    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

                       int maxLabels) {
    this.indexDir = indexDir;
    this.contentField = contentField;
    this.minNumIds = minNumIds;
    this.maxLabels = maxLabels;
    ClusterDumper clusterDumper = new ClusterDumper(seqFileDir, pointsDir);
    this.clusterIdToPoints = clusterDumper.getClusterIdToPoints();
  }
View Full Code Here

    CanopyDriver.run(new Configuration(), directoryContainingConvertedInput, canopyOutput, measure, t1, t2, false, 0.0, false);
    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

TOP

Related Classes of org.apache.mahout.utils.clustering.ClusterDumper

Copyright © 2018 www.massapicom. 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.