首页 > 其他 > 详细

MATLAB SVM

时间:2015-10-19 12:33:48      阅读:320      评论:0      收藏:0      [点我收藏+]

clc;
clear;
close all;

traindata = [1,0; 3,10; 2,2; 2,3; -1,-1; -6,-4; -4,-1; -1.5, -3];
group = [1 1 1 1 -1 -1 -1 -1]‘;

testdata = [ 1,2; 1,1; -1,-4;-2, -3];
svm_struct = svmtrain(traindata,group,‘Showplot‘,true); % training
Group = svmclassify(svm_struct,testdata,‘Showplot‘,true);
hold on;
plot(testdata(:,1),testdata(:,2),‘ro‘,‘MarkerSize‘,12); % testing
hold off

MATLAB SVM

原文:http://www.cnblogs.com/ahuo/p/4891297.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!