linux - 运行此命令时出现错误 mahout trainnb -i path_to/train-vectors -el -li path_to/labelindex -o path_to/model -ow -c

标签 linux hadoop hdfs mahout

enter image description here

见附图。我在本地使用 mahout。我已将序列文件转换为稀疏向量,并将该集合分成两组:训练集和测试集:

mahout split -i tweets-vectors/tfidf-vectors --trainingOutput train-vectors --testOutput test-vectors --randomSelectionPct 40 --overwrite --sequenceFiles -xm sequential.

运行此命令时出现错误 mahout trainnb -i train-vectors -el -li labelindex -o model -ow -c

最佳答案

java.lang.ArrayIndexOutOfBoundsException 通常是由于您在记录或向量中的字段数错误。这可能是由于解析不当(错误的分隔符、逗号分隔文件中的杂散逗号等)或您期望位于错误位置的字段的其他问题引起的。

关于linux - 运行此命令时出现错误 mahout trainnb -i path_to/train-vectors -el -li path_to/labelindex -o path_to/model -ow -c,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48773997/

相关文章:

linux - 程序集:试图写入文件,但文本附加到文件名

linux - 将行分隔值转换为语法

Linux 内核 - 从用户空间停止正在运行的内核定时器

linux - 找不到我的 git 存储库 url

sql - 从Polybase连接到hadoop时,连接被拒绝

hadoop - hadoop何时加载hdfs-site.xml?

php - 使用PHP连接Hive Server2

hadoop - 如何在Hive表中添加/编辑分区列的注释?

java - 通过 Java Program 传递 Hadoop 程序命令

hadoop - 生产级配置单元和Sqoop配置