我正在創建一個稀疏的arff文件,但它不會加載到Weka中。我得到錯誤,我在@attribute類行中有錯誤的數值,它期望1和拒絕接收12.我在做什麼錯了?我的文件看起來像這樣:weka sparse arff文件
%ARFF file for questions data
%
@relation brazilquestions
@attribute att0 numeric
@attribute att1 numeric
@attribute att2 numeric
@attribute att3 numeric
%there are 469 attributes which represent my bag of words
@attribute class {Odontologia_coletiva, Periodontia, Pediatria, Estomatologia,
Dentistica, Ortodontia, Endodontia, Cardiologia, Terapeutica,
Terapeutica_medicamentosa, Odontopediatria, Cirurgia}
@data
{126 1, 147 1, 199 1, 56 1, 367 1, 400 1 , Estomatologia}
{155 1, 76 1, 126 1, 78 1, 341 1, 148 1, Odontopediatria}
%and then 81 more instances of data
有關我的語法出了什麼問題的任何想法?我完全從Witten/Frank/Hall的「數據挖掘」一書中看到了這個例子。提前致謝!
您能寫出錯誤嗎? – jjmartinez
錯誤消息: weka.core.converters.CSVLoader無法加載'問題data.txt的ARFF文件'。 原因: 錯誤的數值。閱讀12,預計1,閱讀令牌[EOL],第477行。 – user3369920
第477行是空的,但第476行包含@attribute類的行 – user3369920