3
我正在使用mahout對使用solr索引的文本文檔進行集羣。從mahout集羣結果中識別文檔
我已經使用文檔中的「文本」字段來形成向量。然後,我在mahout中使用k-means驅動程序進行集羣,然後使用clusterdumper實用程序來轉儲結果。
我很難理解翻車機的輸出結果。我可以看到在這些聚類中用術語向量形成的聚類。 但是,我如何從這些集羣中提取文檔。我希望結果是出現在不同集羣中的輸入文檔。
我正在使用mahout對使用solr索引的文本文檔進行集羣。從mahout集羣結果中識別文檔
我已經使用文檔中的「文本」字段來形成向量。然後,我在mahout中使用k-means驅動程序進行集羣,然後使用clusterdumper實用程序來轉儲結果。
我很難理解翻車機的輸出結果。我可以看到在這些聚類中用術語向量形成的聚類。 但是,我如何從這些集羣中提取文檔。我希望結果是出現在不同集羣中的輸入文檔。
我也有這個問題。這個想法是,羣集傾卸器會將所有羣集數據與點一起轉儲等等。您有兩個選擇:
String clusterInfo = String.format("Cluster %d (%d) with %d points.\n", value.getId(), clusterCount, value.getNumPoints());
writer.write(clusterInfo);
writer.write('\n');
// list all top terms
if (dictionary != null) {
String topTerms = getTopFeatures(value.getCenter(), dictionary, numTopFeatures);
writer.write("\tTop Terms: ");
writer.write(topTerms);
writer.write('\n');
}
// list all the points in the cluster
List points = clusterIdToPoints.get(value.getId());
if (points != null) {
writer.write("\tCluster points:\n\t");
for (Iterator iterator = points.iterator(); iterator.hasNext();) {
WeightedVectorWritable point = iterator.next();
writer.write(String.valueOf(point.getWeight()));
writer.write(": ");
if (point.getVector() instanceof NamedVector) {
writer.write(((NamedVector) point.getVector()).getName() + " ");
}
}
writer.write('\n');
}
我也在尋找這個問題的答案。這個討論: http://www.lucidimagination.com/search/document/dab8c1f3c3addcfe/validating_clustering_output 似乎暗示着這是開放的問題,在0.5亨利馬烏這裏實現了一個補丁,issues.apache.org/JIRA /瀏覽/亨利馬烏-236。 – 2011-01-15 23:28:44