List of usage examples for org.apache.mahout.utils.clustering CSVClusterWriter CSVClusterWriter
public CSVClusterWriter(Writer writer, Map<Integer, List<WeightedPropertyVectorWritable>> clusterIdToPoints,
DistanceMeasure measure)
From source file:tk.summerway.mahout9.tools.MyClusterDumper.java
License:Apache License
ClusterWriter createClusterWriter(Writer writer, String[] dictionary) throws IOException { ClusterWriter result;// w ww . j a va 2s .co m switch (outputFormat) { case TEXT: result = new ClusterDumperWriter(writer, clusterIdToPoints, measure, numTopFeatures, dictionary, subString); break; case CSV: result = new CSVClusterWriter(writer, clusterIdToPoints, measure); break; case GRAPH_ML: result = new GraphMLClusterWriter(writer, clusterIdToPoints, measure, numTopFeatures, dictionary, subString); break; case JSON: result = new JsonClusterWriter(writer, clusterIdToPoints, measure, numTopFeatures, dictionary); break; default: throw new IllegalStateException("Unknown outputformat: " + outputFormat); } return result; }