[英]Apache Mahout- exception with file.csv
I'm new in Apache Mahout. 我是Apache Mahout的新手。 I want to classify a .csv file The columns of this file are id,AAAA,.....TTTT,species and values of each record are ebolavirus1,123,434,34,34,322,1,1,333,4,555,zaire.
我要分类一个.csv文件,此文件的列是id,AAAA,..... TTTT,每种记录的种类和值分别为ebolavirus1,123,434,34,34,322,1,1,333,4,555,zaire。 I want to classify species(ex zaire,sudan,tai forest ebolavirus.
我想对物种进行分类(例如扎伊尔,苏丹,泰森林埃博拉病毒)。
When I try to run my code, it gives me the following exception : 当我尝试运行代码时,它给了我以下异常:
Error: java.lang.IllegalArgumentException: Wrong numLabels: 0. Must be > 0! 错误:java.lang.IllegalArgumentException:错误的numLabels:0。必须大于0!
I follow these steps : 我遵循以下步骤:
./mahout seqdirectory --input input/labelOutput.csv --output target/out ./mahout seq目录--input输入/labelOutput.csv-输出目标/输出
./mahout seq2sparse --input target/out --output target/vectors ./mahout seq2sparse-输入目标/输出-输出目标/向量
./mahout trainnb -i target/vectors/tfidf-vectors -o target/final --li target/labelIndex ./mahout trainnb -i target / vectors / tfidf-vectors -o target / final --li target / labelIndex
Can you help me? 你能帮助我吗?
请检查您的csv文件是否有空行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.