【发布时间】:2017-01-06 07:12:24
【问题描述】:
我通过将文件保存在 ANSI 中并删除第一行并将属性更改为数字而不是实数来在线尝试建议的解决方案,如下所示,甚至在第 29 行添加“}”符号,但我仍然得到以下当我尝试导入 arff 文件时,WEKA 出现错误。
错误信息:
无法将结构确定为 arff(Reason:java.io.IOException: } 预期在枚举结束时,读取 Token[EOL],第 29 行)
ARFF 文件:
@relation Pilot
@attribute Gender? { Male (Lelaki),Female (Perempuan) }
@attribute Age? numeric
@attribute 1# numeric
@attribute 2# numeric
@attribute 22#{Nothing_to_Carry,Need_to_carry_many_things}
@attribute 14# numeric
@attribute 3# numeric
@attribute 18# numeric
@attribute 17# numeric
@attribute 4# numeric
@attribute 5# numeric
@attribute 15# numeric
@attribute 16# numeric
@attribute 19# {No,Yes}
@attribute 20# {Yes,No}
@attribute 6# numeric
@attribute 7# numeric
@attribute 8# numeric
@attribute 9# numeric
@attribute 11# numeric
@attribute 10# numeric
@attribute 12# numeric
@attribute 13# numeric
@attribute 21#{No,Yes}
@attribute Physical_Disability{Partially_Visually_Impaired,Blind}
@attribute 23#{Yes,Don't_know,No}
@attribute 24#{No,Don't know,Yes}
@attribute 25#{Yes,No}
}
@data
Male,36,2,3,Nothing_to_Carry,1,3,2,3,3,2,1,2,No,Yes,3,5,5,4,5,4,3,3,No,Partially_Visually_Impaired,Yes,No,Yes
Female,44,3,3,Nothing_to_Carry,3,4,3,3,4,3,1,1,No,Yes,4,4,3,2,3,3,4,4,No,Partially_Visually_Impaired,Yes,No,Yes
Male,34,3,4,Nothing_to_Carry,3,3,2,1,4,3,2,1,No,Yes,1,4,3,1,5,3,4,5,No,Blind,Yes,Don't know,Yes
Male,56,1,3,Nothing_to_Carry,3,4,4,4,4,3,3,3,No,Yes,1,5,5,5,3,3,5,1,Yes,Blind,Don't know,Yes,Yes
Male,54,5,5,Nothing_to_Carry,1,1,1,5,5,5,1,5,No,Yes,1,5,5,1,5,1,1,5,Yes,Blind,Yes,No,Yes
Female,39,1,1,Nothing_to_Carry,1,2,1,5,3,5,5,5,Yes,Yes,3,3,5,1,1,5,5,5,Yes,Blind,Yes,Yes,Yes
Male,49,2,3,Nothing_to_Carry,2,2,3,4,4,4,3,3,No,Yes,1,3,3,4,3,3,4,4,No,Partially_Visually_Impaired,No,No,Yes
Male,68,5,4,Nothing_to_Carry,4,4,2,5,2,3,3,3,No,No,1,2,3,1,3,3,3,4,No,Blind,Yes,Don't know,No
Male,44,1,1,Nothing_to_Carry,1,3,3,3,3,3,3,1,No,Yes,1,5,4,4,3,4,2,2,Yes,Blind,Yes,Yes,Yes
Male,45,1,1,Nothing_to_Carry,1,2,1,1,1,1,3,1,No,Yes,5,5,1,5,5,5,5,5,No,Partially_Visually_Impaired,No,No,Yes
Male,59,3,4,Nothing_to_Carry,4,3,3,3,3,3,3,3,No,No,2,1,3,1,4,3,4,2,No,Blind,Yes,Yes,No
Male,38,3,3,Nothing_to_Carry,4,4,3,4,4,3,3,3,No,Yes,4,2,4,1,2,3,3,3,No,Partially_Visually_Impaired,Yes,No,Yes
Male,29,4,2,Nothing_to_Carry,4,4,4,4,3,4,4,3,Yes,Yes,4,3,3,3,3,3,4,3,No,Blind,Yes,No,Yes
}
请指教...谢谢。
【问题讨论】:
标签: attributes weka arff