我正在创建一个arff文件并将其加载到Weka中,当我尝试运行J48决策树时,我收到以下错误消息:
不能有多于实例的折叠
以下是我到目前为止所获得的arff文件代码。
@relation correlation
@attribute Exercise {StarJumps, Swimming, Weightlift}
@attribute mean real
@attribute median real
@attribute mode real
@attribute variance real
@data
StarJumps,-35.1736999860234,-38.3397969100000,-78.7680334500000,1640.14992832077
StarJumps,12.8784175778633,11.2917098850000,-14.6784661500000,198.409868585395
StarJumps,-9.46453776621485,-4.66403639400000,-77.4871379300000,914.608427610169
Swimming,-22.0052249449766,-21.9835538100000,-61.8976363600000,184.991150374811
Swimming,27.4404695437188,31.7069603200000,-38.8908675200000,571.188153279291
Swimming,-23.0069047690899,-23.7253122400000,-65.0011242700000,312.565133535617
Weightlift,-29.9352298211914,-29.2759990400000,-77.3315111600000,739.673719008139
Weightlift,-2.73629441549609,-1.20216138950000,-42.4630638500000,208.415460430934
Weightlift,6.59529078057812,15.0662737500000,-77.0678713200000,982.853303465782
任何帮助将不胜感激!
答案 0 :(得分:0)
这是因为您使用的交叉验证折叠高于实例数(9)使用9或更少。您还可以增加实例数。我建议将Class放在最后用于数据结构。校验: https://weka.wikispaces.com/ARFF+%28stable+version%29
干杯