SVM classification for healthy a
조회 수: 2 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!