SVM classification for healthy a

2 Ansichten (letzte 30 Tage)
Vania krm
Vania krm am 17 Mai 2019
segmented_features=sFeat;
%Feature reduction using PCA
[coeff,G,latent]=pca(segmented_features); %score==G mxn
%traindata
xdata=G(1:60,:);
group_label=label(1:60,:);
group_label=double(group_label);
%testdata
xtdata=G(61:100,:);
groupt_label=double(label(61:100,:));
%SVM
svmStruct1 = svmtrain(xdata,group_label);
species = svmclassify(svmStruct1,xtdata);
Why in this code my SVM does not work and I have these errors:
Reference to non-existent field 'SupportVectors'.
Error in svmclassify (line 60)
if size(sample,2)~=size(svmStruct.SupportVectors,2)
Error in Both3march (line 17)
species = svmclassify(svmStruct1,xtdata);
when I check the svmStruct1= number of classes are recognised 60 instead of 2! can any one help me.

Antworten (0)

Kategorien

Mehr zu Statistics and Machine Learning Toolbox finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by