【问题标题】:Getting empty cluster result with vectordump command in mahout kmeans algorithm在 mahout kmeans 算法中使用 vectordump 命令获取空簇结果
【发布时间】:2013-08-07 07:23:39
【问题描述】:

我已安装并启动 hadoop 并运行以下命令

mahout seqdirectory -c UTF-8 -i Input_files -o seqfiles

mahout seq2sparse -i seqfiles/ -o vectorfiles/ -ow

mahout kmeans -i vectorfiles/tf-vectors/ -c initial-clusters -o kmeans-clusters -dm org.apache.mahout.common.distance.SquaredEuclideanDistanceMeasure -cd 1.0 -k 20 -x 20 -cl

mahout clusterdump -dt sequencefile -d vectorfiles/dictionary.file-0 -i kmeans-clusters/clusters-1-final -o result.txt -b 10 -n 10

当我打开我的 result.txt 时,它给了我

VL-1{n=2 c= all:1.00
     Top Terms:

下面是我的文本示例文本文件

John is working in London

请建议我如何为我的示例文本文件获取集群

【问题讨论】:

    标签: linux mahout k-means


    【解决方案1】:

    只有一行是不够的。我做了一些黑客攻击

    • 只需在文件夹 Input_files 中创建一个虚拟文件,其中包含虚拟词 它。

    它会运行。 如果您有更好的解决方案,请告诉我

    【讨论】:

      猜你喜欢
      • 2014-02-16
      • 2014-02-20
      • 2021-06-13
      • 2021-04-21
      • 2019-12-22
      • 1970-01-01
      • 2019-07-16
      • 2014-08-17
      • 2011-08-10
      相关资源
      最近更新 更多