Example usage for org.apache.mahout.utils.clustering ClusterDumper ClusterDumper

List of usage examples for org.apache.mahout.utils.clustering ClusterDumper ClusterDumper

Introduction

In this page you can find the example usage for org.apache.mahout.utils.clustering ClusterDumper ClusterDumper.

Prototype

public ClusterDumper() 

Source Link

Usage

From source file:com.modofo.molo.cluster.Clusterer.java

License:Apache License

public void dump(String topicId, String clusterId) {
    String clusterDir = this.tempDir + "/" + topicId + "/cluster/clusters-" + clusterId;
    String dumpDir = this.tempDir + "/" + topicId + "/cluster/clusters-" + clusterId + "-dump";
    String dicDir = this.tempDir + "/" + topicId + "/" + topicId + "-vectors/dictionary.file-0";
    String[] args = { "-i", clusterDir, "-o", dumpDir, "-d", dicDir, "-dt", "sequencefile", "-b", "100", "-n",
            "20" };
    ClusterDumper cd = new ClusterDumper();
    cd.setConf(new Configuration());
    try {/*from   www. j  av a 2 s.c o  m*/
        cd.run(args);
    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}