SVM classification for healthy a
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!