java 在weka中过早结束
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26876836/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Premature end of line in weka
提问by Marcin Erbel
I have some data inside arff file and I can't convert it. I don't know what is wrong.
我在 arff 文件中有一些数据,我无法转换它。我不知道出了什么问题。
@RELATION relationName
@ATTRIBUTE IP STRING
@ATTRIBUTE data STRING
@ATTRIBUTE adress STRING
@ATTRIBUTE error_code STRING
@ATTRIBUTE dunno STRING
@ATTRIBUTE class STRING
@DATA
202.32.92.47,01:Jun:1995:00:00:59,/~scottp/publish.html,200,271
ix-or7-27.ix.netcom.com,112,/~ladd/ostriches.html,200,20
...
I'm getting error like: Unable to determine as arff (Reason: java.io.IOException: premature end of line, read Token [EOL], line 11.
我收到如下错误:无法确定为 arff(原因:java.io.IOException:行过早结束,读取令牌 [EOL],第 11 行。
The line 11 is after the first row. I was also trying to convert it to csv with headers like a :
第 11 行在第一行之后。我还试图将其转换为带有以下标题的 csv :
a b c d e
but then I'm getting an error like a : wrong headers...
但是后来我收到了一个错误,例如:错误的标题...
回答by Matthew Spencer
You have six attributes, though your data only contains five.
您有六个属性,但您的数据只包含五个。
If you do not know the value of your class, perhaps you could place a value of ? at the end of each line.
如果您不知道您的班级的价值,也许您可以将 ? 在每一行的末尾。
Hope this helps!
希望这可以帮助!