我正在尝试使用Weka来使用arff文件做出决定,但是当我尝试分类时我收到错误“问题评估分类器:火车和测试集不兼容”。
这是我的weather.arff文件
@relation weather
@attribute outlook {sunny, overcast, rainy}
@attribute temperature real
@attribute humidity real
@attribute windy {TRUE, FALSE}
@attribute play {yes, no}
@data
sunny,85,85,FALSE,no
sunny,80,90,TRUE,no
overcast,83,86,FALSE,yes
rainy,70,96,FALSE,yes
rainy,68,80,FALSE,yes
rainy,65,70,TRUE,no
overcast,64,65,TRUE,yes
sunny,72,95,FALSE,no
sunny,69,70,FALSE,yes
rainy,75,80,FALSE,yes
sunny,75,70,TRUE,yes
overcast,72,90,TRUE,yes
overcast,81,75,FALSE,yes
rainy,71,91,TRUE,no
这是我的weather.nominal.classify.arff
@relation weather.symbolic
@attribute outlook {sunny, overcast, rainy}
@attribute temperature {hot, mild, cool}
@attribute humidity {high, normal}
@attribute windy {TRUE, FALSE}
@attribute play {yes, no}
@data
overcast,mild,high,TRUE,?
你的属性是不同的。在你的第一个文件中你有@attribute temperature real,在你的第二个文件中你有@attribute temperature {hot,mild,cool}
与湿度相同。您需要使属性定义完全相同。