SVM classification for healthy a
    2 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
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 comentarios
Respuestas (0)
Ver también
Categorías
				Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.
			
	Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
