相关代码 |
|
%svm2_figure:to look the figure of input data %============== %============== clc iris = load('example42_iris.txt'); x = iris(:,3:4); y = 2*(iris(:,5) == 2)-1; figure('name','输入数据图示','numbertitle','off'); plot(x(find(y==1),1)',x(find(y==1),2)','bs',x(find(y==-1),1)',x(find(y==-1),2)','ko') axis(axis + [-0.1 +0.1 -0.1 +0.1]) legend('class one','class two',0);