Weka CSVLoader错误的数值。阅读2,预计23

问题描述:

我想从CSV转换CSV到ARFF使用Weka的CSVLoader从GUI。在选项中,我将字符串的外壳字符设置为",尽管我的文件中没有引号。 我得到以下错误:Weka CSVLoader错误的数值。阅读2,预计23

weka.core.converters.CSVLoaderfailed to lead <my file> 
Reason: 
wrong number of values. Read 2, expected 23, read Token[EOL], line 1763 

这里是行1762年至1764年:

450c787001b004af69428e267c7a4ca1,I_need need_to to_go go_back back_to to_my my_live live_food food_diet diet_PPP PPP_Not Not_90% 90%_like like_before before_CCC CCC_but but_I I_bet bet_I I_could could_do do_75% 75%_without without_losing losing_too too_much much_weight weight_PPP PPP_PPP,2.30,3.50,4.50,2.85,4.50,n,y,y,n,y,AM,297,41728.8,95.58,0.03,42826,0.49,0.17,-12.5611111111,0.248945147679,0.0595238095238 
450c787001b004af69428e267c7a4ca1,It's_ugly ugly_here here_PPP PPP_But But_there there_are are_sparks sparks_PPP PPP_PPP PPP_PPPmoments PPPmoments_PPP PPP_Love Love_PPP,2.30,3.50,4.50,2.85,4.50,n,y,y,n,y,AM,297,41728.8,95.58,0.03,42826,0.49,0.17,-15.91,0.299242424242,0.1 
450c787001b004af69428e267c7a4ca1,I_guess guess_it it_all all_depends depends_on on_your your_mood mood_PPP PPP_PPP PPP_PPPwhy PPPwhy_can't can't_these these_meds meds_be be_any any_damn damn_good good_QQQ,2.30,3.50,4.50,2.85,4.50,n,y,y,n,y,AM,297,41728.8,95.58,0.03,42826,0.49,0.17,-12.9970588235,0.0,0.0344827586207 

任何想法?我似乎无法找到错误。

EDIT--- 

当然,之后我贴我找到了“错误”的CSVLoader不喜欢的字符%。所以,我改变了我的问题:有人知道这是为什么,或者其他人不喜欢它吗?

+1

它的一个耻辱weka人不能使文件阅读工作。 – OneSolitaryNoob 2014-10-01 21:50:04

如果被用作数据

,=“'这些字符通常会导致问题* + - %

该错误是由撇号在1763年线

使用这个代码中的R所引起语言和更改文件它将解决您的问题100%

mydata=read.csv("train.csv",header=TRUE) 
library("foreign") 
write.arff(x =mydata ,file= "train.arff")