见附图。我在本地使用 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/