error using classperf in newrbf

1 次查看(过去 30 天)
FIR
FIR 2012-4-16
I have a code
data=[0.5 .3 0.6 0.5;0.2 0.3 0.5 0.9;0.1 0.7 0.2 0.8;0.5 .3 0.6 0.5;0.2 0.3 0.5 0.9;0.1 0.7 0.2 0.8]
P=data(1:3,1:2);
T=data(1:3,3);
a=data(4:6,1:2);
s=data(4:6,3);
groups=[0;1;1;0;1;1]
groups = cellstr(num2str(groups))
cvFolds = crossvalind('kfold', groups, 10); %# get indices of 10-fold CV %# get indices of 10-fold CV
cp = classperf(groups);
for i = 1:10
net = newrb(P',T',0,3,12,1);
Y=sim(net,a')
d=[Y' s]
cp = classperf(cp, d)
end
I get an error as
Error using classperf (line 244)
When class labels of the CP object is a cell array of strings and
the classifier output is a numeric array, it must contain valid
indices of the class labels or NaNs for inconclusive results.
please help

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Import and Management 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by