91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

分類器設計之線性分類器和線性SVM(Matlab代碼 具休請參考本人博客: http://blog.csdn.net/ranchlai/article/details/10303031

資源截圖

代碼片段和文件信息

%
%?Liscense?Notification?2013
%
%?Redistributions?in?source?and?binary?forms?with?or?without
%?modification?are?totally?FREE?provided?that?you?keep?this?keep?this
%?notification
%
%??Descritption:?This?package?demonstrates?how?to?use?the?logistic
%??regression?for?classfication?of?2D?data.
%??Author:??Ranch?Lai?(ranchlai@hotmail.com)
%??Release?date:?Aug?17?2013
%/
%%
clc;
clear;
close?all;
%%?generate?random?data
shift?=?3;
n?=?200;
m=200;
d?=?2;
sigma?=?1;
x?=?randn(dn)-shift;
y?=?randn(dm)*sigma+shift;
%%
%show?the?data
figure;
plot(x(1:)x(2:)‘rs‘);
hold?on;
plot(y(1:)y(2:)‘go‘);
%title(‘2d?training?data‘);
legend(‘Positive?samples‘‘Negative?samples‘);
%%
%training..
for?i=1:n
????A(i:)?=?[-x(:i)‘-1];
end
for?i=1:m
????A(i+n:)?=?[y(:i)‘1];
end
c?=?ones(n+m1)*(-1);
w?=?linprog(zeros(d+11)Ac);
hold?on;
%%?visualize?the?classification?aera
x1?=?-shift-2:0.1:shift+2*sigma;
y1?=?(-w(3)-w(1)*x1)/w(2);
plot(x1y1‘-‘‘LineWidth‘2);
legend(‘Positive?samples‘‘Negative?samples‘‘Linear?programming‘);
?

%%?svm
H?=?eye(d+1);
H(d+1d+1)?=?0;
w?=?quadprog(Hzeros(d+11)Ac);
hold?on;
x1?=?-shift-2:0.1:shift+2*sigma;
y1?=?(-w(3)-w(1)*x1)/w(2);
plot(x1y1‘g-‘‘LineWidth‘2);
y1?=?(-1-w(3)-w(1)*x1)/w(2);
plot(x1y1‘g-‘‘LineWidth‘2);
y1?=?(1-w(3)-w(1)*x1)/w(2);
plot(x1y1‘g-‘‘LineWidth‘2);
legend(‘Positive?samples‘‘Negative?samples‘‘Linear?programming‘‘Linear?SVM‘);
????????
????????





?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-08-25?17:41??linear?programming?and?svm\
?????文件????????1435??2013-08-25?16:03??linear?programming?and?svm\demo_lp_svm.m
?????目錄???????????0??2013-08-25?14:40??linear?programming?and?svm\figure\
?????目錄???????????0??2013-08-25?14:47??linear?programming?and?svm\figure\shift=3\
?????文件???????12140??2013-08-25?14:47??linear?programming?and?svm\figure\shift=3\all.png
?????文件????????9077??2013-08-25?14:47??linear?programming?and?svm\figure\shift=3\data.png
?????文件???????10087??2013-08-25?14:47??linear?programming?and?svm\figure\shift=3\lp.png

評論

共有 條評論