Support vector machine is not working?? help??

2 views (last 30 days)
Mahirah Hamdan
Mahirah Hamdan on 4 May 2014
Edited: Jan on 4 May 2014
i have two data which is pxx3 and pxx4. below is my code program..
plot(pxx3,'go')
hold on
plot(pxx4,'ro')
hold off
cdata = [pxx3;pxx4];
grp = ones(2050,1);
% green label 1, red label -1
grp(1025:2050) = -1;
svmStruct = svmtrain(cdata,grp,'Kernel_Function','rbf',...
'showplot',true);
hold on
but it keep showing "Warning: The display option can only plot 2D training data. > In svmtrain at 398 " what is my fault?? help please??
  1 Comment
Jan
Jan on 4 May 2014
Edited: Jan on 4 May 2014
I've deleted the duplicate question. Adding "matlab" as a tag is meaningless, because all questions in this forum concern Matlab.
We cannot guess the dimensions of pxx2 and pxx4, such that the size of cdata is not clear. But the error message seems to tell you, that this is not a 2D matrix. Please show us more details.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!