what is mean of 5 which come as output if it is accurcy it is out of 7 or 100

1 view (last 30 days)
I'm working on a disease classification
I have 7 samples for train and 7 samples for test. This is my code:
Label=[1;1;1;1;1;1;1;-1;-1;-1;-1;-1;-1;-1;];
Trainset=[376,298;
89,154;
266,114;
298,200;
323,226;
307,265;
210,307;
350,302;
222,224;
367,506;
457,141;
272,294;
423,508;
151,124;];
Testset=[ 448,232;
366,360;
370,353;
142,545;
345,457;
443,448;
138,386;
541,250;
364,210;
280,504;
427,386;
333,153;
86,335;
332,511;];
model=svmtrain(Trainset,Label,'ShowPlot',true);
Group = svmclassify(model,Testset,'Showplot',true)
but when I want to calculate accuracy with code below, it shows output ''5''
>> acc = sum(1 == testoutput) / numel(-1)
my question is "what is mean of 5 which is come as output"?

Answers (1)

Walter Roberson
Walter Roberson on 24 Jun 2016
You do not show any assignment to testoutput
numel(-1) is the number of elements in the numeric scalar (-1) which is going to be 1. That does not appear to be a useful expression.

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!