求教关于交叉验证
高手能帮我看看crossvalind函数的和help中给的例子什么意思吗?本人对这方面比较陌生% Create a 10-fold cross-validation to compute classification error.
load fisheriris
indices = crossvalind('Kfold',species,10);
cp = classperf(species);
for i = 1:10
test = (indices == i); train = ~test;
class = classify(meas(test,:),meas(train,:),species(train,:));
classperf(cp,class,test)
end
哪为高手对交叉验证有研究吗?急用!
页:
[1]