亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? demsvm1.m

?? 糾錯輸出編碼的多類支持向量機,自己編輯的碼本,完全隨機編碼,對于7-15類效果很好
?? M
字號:
function demsvm1()% DEMSVM1 - Demonstrate basic Support Vector Machine classification% %   DEMSVM1 demonstrates the classification of a simple artificial data%   set by a Support Vector Machine classifier, using different kernel%   functions.%%   See also%   SVM, SVMTRAIN, SVMFWD, SVMKERNEL, DEMSVM2%% % Copyright (c) Anton Schwaighofer (2001) % This program is released unter the GNU General Public License.% X = [2 7; 3 6; 2 2; 8 1; 6 4; 4 8; 9 5; 9 9; 9 4; 6 9; 7 4];Y = [ +1;  +1;  +1;  +1;  +1;  -1;  -1;  -1;  -1;  -1;  -1];% define a simple artificial data setx1ran = [0 10];x2ran = [0 10];% range for plotting the data set and the decision boundarydisp(' ');disp('This demonstration illustrates the use of a Support Vector Machine');disp('(SVM) for classification. The data is a set of 2D points, together');disp('with target values (class labels) +1 or -1.');disp(' ');disp('The data set consists of the points');ind = [1:length(Y)]';fprintf('X%2i = (%2i, %2i) with label Y%2i = %2i\n', [ind, X, ind, Y]');disp(' ')disp('Press any key to plot the data set');pausef1 = figure;plotdata(X, Y, x1ran, x2ran);title('Data from class +1 (squares) and class -1 (crosses)');fprintf('\n\n\n\n');fprintf('The data is plotted in figure %i, where\n', f1);disp('  squares stand for points with label Yi = +1');disp('  crosses stand for points with label Yi = -1');disp(' ')disp(' ');disp('Now we train a Support Vector Machine classifier on this data set.');disp('We use the most simple kernel function, namely the inner product');disp('of points Xi, Xj (linear kernel K(Xi,Xj) = Xi''*Xj )');disp(' ');disp('Press any key to start training')pausenet = svm(size(X, 2), 'linear', [], 10);net = svmtrain(net, X, Y);f2 = figure;plotboundary(net, x1ran, x2ran);plotdata(X, Y, x1ran, x2ran);plotsv(net, X, Y);title(['SVM with linear kernel: decision boundary (black) plus Support' ...       ' Vectors (red)']);fprintf('\n\n\n\n');fprintf('The resulting decision boundary is plotted in figure %i.\n', f2);disp('The contour plotted in black separates class +1 from class -1');disp('(this is the actual decision boundary)');disp('The contour plotted in red are the points at distance +1 from the');disp('decision boundary, the blue contour are the points at distance -1.');disp(' ');disp('All examples plotted in red are found to be Support Vectors.');disp('Support Vectors are the examples at distance +1 or -1 from the ');disp('decision boundary and all the examples that cannot be classified');disp('correctly.');disp(' ');disp('The data set shown can be correctly classified using a linear');disp('kernel. This can be seen from the coefficients alpha associated');disp('with each example: The coefficients are');ind = [1:length(Y)]';fprintf('  Example %2i: alpha%2i = %5.2f\n', [ind, ind, net.alpha]');disp('The upper bound C for the coefficients has been set to');fprintf('C = %5.2f. None of the coefficients are at the bound,\n', ...	net.c(1));disp('this means that all examples in the training set can be correctly');disp('classified by the SVM.')disp(' ');disp('Press any key to continue')pauseX = [X; [4 4]];Y = [Y; -1];net = svm(size(X, 2), 'linear', [], 10);net = svmtrain(net, X, Y);f3 = figure;plotboundary(net, x1ran, x2ran);plotdata(X, Y, x1ran, x2ran);plotsv(net, X, Y);title(['SVM with linear kernel: decision boundary (black) plus Support' ...       ' Vectors (red)']);fprintf('\n\n\n\n');disp('Adding an additional point X12 with label -1 gives a data set');disp('that can not be linearly separated. The SVM handles this case by');disp('allowing training points to be misclassified.');disp(' ');disp('Training the SVM on this modified data set we see that the points');disp('X5, X11 and X12 can not be correctly classified. The decision');fprintf('boundary is shown in figure %i.\n', f3);disp('The coefficients alpha associated with each example are');ind = [1:length(Y)]';fprintf('  Example %2i: alpha%2i = %5.2f\n', [ind, ind, net.alpha]');disp('The coefficients of the misclassified points are at the upper');disp('bound C.');disp(' ')disp('Press any key to continue')pausefprintf('\n\n\n\n');disp('Adding the new point X12 has lead to a more difficult data set');disp('that can no longer be separated by a simple linear kernel.');disp('We can now switch to a more powerful kernel function, namely');disp('the Radial Basis Function (RBF) kernel.');disp(' ')disp('The RBF kernel has an associated parameter, the kernel width.');disp('We will now show the decision boundary obtained from a SVM with');disp('RBF kernel for 3 different values of the kernel width.');disp(' ');disp('Press any key to continue')pausenet = svm(size(X, 2), 'rbf', [8], 100);net = svmtrain(net, X, Y);f4 = figure;plotboundary(net, x1ran, x2ran);plotdata(X, Y, x1ran, x2ran);plotsv(net, X, Y);title(['SVM with RBF kernel, width 8: decision boundary (black)' ...       ' plus Support Vectors (red)']); fprintf('\n\n\n\n');fprintf('Figure %i shows the decision boundary obtained from a SVM\n', ...	f4);disp('with Radial Basis Function kernel, the kernel width has been');disp('set to 8.');disp('The SVM now interprets the new point X12 as evidence for a');disp('cluster of points from class -1, the SVM builds a small ''island''');disp('around X12.');disp(' ')disp('Press any key to continue')pausenet = svm(size(X, 2), 'rbf', [1], 100);net = svmtrain(net, X, Y);f5 = figure;plotboundary(net, x1ran, x2ran);plotdata(X, Y, x1ran, x2ran);plotsv(net, X, Y);title(['SVM with RBF kernel, width 1: decision boundary (black)' ...       ' plus Support Vectors (red)']); fprintf('\n\n\n\n');fprintf('Figure %i shows the decision boundary obtained from a SVM\n', ...	f5);disp('with radial basis function kernel, kernel width 1.');disp('The decision boundary is now highly shattered, since a smaller');disp('kernel width allows the decision boundary to be more curved.');disp(' ')disp('Press any key to continue')pausenet = svm(size(X, 2), 'rbf', [36], 100);net = svmtrain(net, X, Y);f6 = figure;plotboundary(net, x1ran, x2ran);plotdata(X, Y, x1ran, x2ran);plotsv(net, X, Y);title(['SVM with RBF kernel, width 36: decision boundary (black)' ...       ' plus Support Vectors (red)']); fprintf('\n\n\n\n');fprintf('Figure %i shows the decision boundary obtained from a SVM\n', ...	f6);disp('with radial basis function kernel, kernel width 36.');disp('This gives a decision boundary similar to the one shown in');fprintf('Figure %i for the SVM with linear kernel.\n', f2);fprintf('\n\n\n\n');disp('Press any key to end the demo')pausedelete(f1);delete(f2);delete(f3);delete(f4);delete(f5);delete(f6);function plotdata(X, Y, x1ran, x2ran)% PLOTDATA - Plot 2D data set% hold on;ind = find(Y>0);plot(X(ind,1), X(ind,2), 'ks');ind = find(Y<0);plot(X(ind,1), X(ind,2), 'kx');text(X(:,1)+.2,X(:,2), int2str([1:length(Y)]'));axis([x1ran x2ran]);axis xy;function plotsv(net, X, Y)% PLOTSV - Plot Support Vectors% hold on;ind = find(Y(net.svind)>0);plot(X(net.svind(ind),1),X(net.svind(ind),2),'rs');ind = find(Y(net.svind)<0);plot(X(net.svind(ind),1),X(net.svind(ind),2),'rx');function [x11, x22, x1x2out] = plotboundary(net, x1ran, x2ran)% PLOTBOUNDARY - Plot SVM decision boundary on range X1RAN and X2RAN% hold on;nbpoints = 100;x1 = x1ran(1):(x1ran(2)-x1ran(1))/nbpoints:x1ran(2);x2 = x2ran(1):(x2ran(2)-x2ran(1))/nbpoints:x2ran(2);[x11, x22] = meshgrid(x1, x2);[dummy, x1x2out] = svmfwd(net, [x11(:),x22(:)]);x1x2out = reshape(x1x2out, [length(x1) length(x2)]);contour(x11, x22, x1x2out, [-0.99 -0.99], 'b-');contour(x11, x22, x1x2out, [0 0], 'k-');contour(x11, x22, x1x2out, [0.99 0.99], 'g-');

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产高清一区二区三区 | 欧美视频中文一区二区三区在线观看| 经典三级在线一区| 国产成a人无v码亚洲福利| bt欧美亚洲午夜电影天堂| 91影院在线免费观看| 精品视频一区三区九区| 26uuu精品一区二区| 亚洲欧美另类在线| 捆绑紧缚一区二区三区视频 | 成人午夜电影久久影院| 欧美在线观看视频在线| 日韩女优毛片在线| 国产精品高潮呻吟| 国产酒店精品激情| 欧美日韩国产精品自在自线| 中文字幕一区二区在线观看| 日本欧美在线观看| 91农村精品一区二区在线| 日韩免费观看高清完整版| 日韩理论片中文av| 国产一区二区三区四区五区入口 | 欧美一区二区三区不卡| 国产精品剧情在线亚洲| 美女www一区二区| 欧美三级三级三级爽爽爽| 欧美精品一区二区三| 香蕉乱码成人久久天堂爱免费| 岛国精品在线观看| 精品国产99国产精品| 午夜av电影一区| 一本色道久久综合精品竹菊| 久久久不卡网国产精品二区| 日韩激情一区二区| 欧美性生活久久| 亚洲欧美一区二区三区孕妇| 国产精品自拍网站| 欧美一二区视频| 性做久久久久久免费观看欧美| 99久久精品国产一区二区三区| 精品日韩一区二区| 精品一区二区三区欧美| 884aa四虎影成人精品一区| 亚洲影视在线观看| 色综合中文综合网| 国产午夜精品一区二区三区四区| 国产精品18久久久久久久久 | 欧美丝袜丝nylons| 免费观看在线综合| 久久久99精品久久| 91亚洲精品一区二区乱码| 一区二区久久久久久| 欧美精品一级二级| 韩国毛片一区二区三区| 国产精品欧美精品| 在线观看www91| 日本 国产 欧美色综合| 国产色91在线| 色88888久久久久久影院野外| 亚洲午夜日本在线观看| 国产欧美精品在线观看| www.一区二区| 丝袜美腿亚洲一区二区图片| 久久久久久久久99精品| 色综合久久综合网97色综合 | 国产精品久久久久久一区二区三区| 99久久久久久| 日本午夜一本久久久综合| 国产日韩视频一区二区三区| 在线日韩av片| 国产一区二区在线观看视频| 综合久久综合久久| 日韩欧美自拍偷拍| 91在线观看视频| 激情五月婷婷综合网| 有码一区二区三区| 国产三区在线成人av| 91精品国产综合久久久久| 成人在线综合网| 日本伊人色综合网| 亚洲欧美日韩久久精品| 久久夜色精品国产欧美乱极品| 97精品国产97久久久久久久久久久久| 日产国产高清一区二区三区| 中文字幕在线不卡| 精品999在线播放| 欧美日韩精品一区二区三区 | 美国三级日本三级久久99| 亚洲欧洲精品一区二区三区| 91精品国产福利在线观看| 91美女在线看| 国产精品一区二区久激情瑜伽| 午夜精品成人在线视频| 日韩美女视频一区| 国产亲近乱来精品视频| 欧美成人精品高清在线播放| 欧洲精品在线观看| 成人黄动漫网站免费app| 激情五月播播久久久精品| 日韩综合一区二区| 一区二区三区四区精品在线视频 | 国产激情一区二区三区| 琪琪久久久久日韩精品| 亚洲图片欧美一区| 一区二区三区中文字幕| 亚洲欧洲日韩一区二区三区| 精品精品欲导航| 日韩精品在线看片z| 欧美一区国产二区| 91麻豆精品国产91久久久久| 欧美四级电影网| 色婷婷综合久久久中文一区二区 | 日本道色综合久久| 91日韩精品一区| 91麻豆自制传媒国产之光| 99re热这里只有精品免费视频| 成人h精品动漫一区二区三区| 成人免费视频视频在线观看免费 | 首页国产丝袜综合| 亚洲成人免费影院| 婷婷六月综合亚洲| 日韩主播视频在线| 精品一区二区三区久久| 国产精品中文有码| 99这里只有久久精品视频| 91免费视频网| 欧美日韩你懂得| 日韩欧美中文字幕制服| 国产亚洲女人久久久久毛片| 国产欧美中文在线| 亚洲欧洲一区二区三区| 亚洲一区二区三区四区五区黄 | 粗大黑人巨茎大战欧美成人| 国产精品99久久久久久有的能看 | 老司机精品视频在线| 韩国精品一区二区| 成人性视频网站| 欧美在线观看你懂的| 欧美一区二区三区视频免费播放| 26uuu亚洲婷婷狠狠天堂| 欧美性做爰猛烈叫床潮| 国产宾馆实践打屁股91| 99精品一区二区三区| 欧美日韩免费高清一区色橹橹| 欧美三级电影在线看| 欧美成人精品1314www| 国产农村妇女精品| 亚洲成av人片在线观看| 国产在线观看一区二区| av在线不卡免费看| 69久久99精品久久久久婷婷| 337p粉嫩大胆噜噜噜噜噜91av | 欧美日韩mp4| 国产亚洲短视频| 亚洲一区二区在线观看视频| 老司机精品视频一区二区三区| 国产99久久久精品| 欧美日韩电影一区| 国产精品人妖ts系列视频| 亚洲高清久久久| 成人综合婷婷国产精品久久 | 亚洲永久精品大片| 国产精品88888| 欧美丰满少妇xxxxx高潮对白| 国产日韩欧美激情| 日本强好片久久久久久aaa| 99精品一区二区三区| 欧美精品一区二区三区很污很色的 | 久久无码av三级| 亚洲国产成人av网| 成人av手机在线观看| 欧美大度的电影原声| 亚洲一区二区欧美| av一区二区三区| 国产亚洲欧美一级| 蜜桃免费网站一区二区三区| 色综合久久99| 中文成人综合网| 国产精品综合一区二区三区| 欧美一二三区精品| 日韩一区欧美二区| 欧美无砖砖区免费| 一区二区三区在线免费观看| 成人国产精品免费观看视频| 久久在线观看免费| 久久国产夜色精品鲁鲁99| 欧美疯狂性受xxxxx喷水图片| 亚洲小说欧美激情另类| av电影在线不卡| 中文字幕高清不卡| 国产91对白在线观看九色| 久久影视一区二区| 国产福利精品一区二区| 久久女同互慰一区二区三区| 久久国产乱子精品免费女| 日韩一区二区不卡| 免费在线成人网| 日韩免费福利电影在线观看| 日本va欧美va欧美va精品| 欧美一卡二卡在线|