error using classperf function
显示 更早的评论
I am working on neural network ,I want ti find the classifier performance,but i get error
Indices = crossvalind('Kfold',class1 , 10);cp = classperf(class1);
for i=1:10
test = (Indices == i);
trainn = ~test;
net = newff(inputs(:,trainn),targets(:,trainn),20,{},'trainscg');
net = train(net,res1(trainn),class1(trainn));
a = sim(net,res1(test));
% b=sim(net,inputs(:,test));
classperf(cp,a,test)
end
i have input as 4x30
error msg is
When the class labels of the CP object are numeric, the output of the classifier must be all non-negative integers or NaN's.
kindly assist
1 个评论
Greg Heath
2013-11-7
It would help immensely if you tried your code on MATLAB data:
help nndatasets.
Have you thought about including a non-training validation design set to prevent overtraining an overfit net?
What version are you using?
>> help newff newff Create a feed-forward backpropagation network.
Obsoleted in R2010b NNET 7.0. Last used in R2010a NNET 6.0.4.
Why NEWFF instead of the classification/pattern-recognition function NEWPR? Remember,as of 2010
NEWFIT/NEWPR/NEWFF ==> FITNET/PATTERNNET/FEEDFORWARDNET
I'll try your code on
help simpleclass_dataset
Greg
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Workspace Variables and MAT Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!