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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? demsvm1.m

?? LibSVM工具箱
?? 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-');

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91浏览器入口在线观看| 色综合久久88色综合天天免费| 国产精品网友自拍| 欧美三级资源在线| 成人精品视频一区二区三区尤物| 亚洲成人在线免费| 中文字幕一区二区三区四区| 日韩欧美成人午夜| 欧美亚洲免费在线一区| 99天天综合性| 国产精品中文欧美| 久久精品国产精品亚洲精品 | 日韩在线一区二区三区| 亚洲人一二三区| 久久嫩草精品久久久精品| 91.xcao| 欧美性生活久久| 91社区在线播放| 国产成a人无v码亚洲福利| 精品中文字幕一区二区小辣椒| 亚洲一二三四区| 亚洲品质自拍视频| 亚洲欧美综合色| 中文天堂在线一区| 2023国产精品自拍| 精品国产91久久久久久久妲己| 欧美日韩国产天堂| 在线亚洲一区观看| 色综合久久中文字幕| 丁香激情综合国产| 国产成人啪免费观看软件| 狠狠色狠狠色合久久伊人| 韩国av一区二区三区在线观看| 日韩av一区二区三区四区| 天天爽夜夜爽夜夜爽精品视频| 亚洲一区免费在线观看| 99国内精品久久| 99精品桃花视频在线观看| 成人免费毛片嘿嘿连载视频| 成人激情综合网站| 97se狠狠狠综合亚洲狠狠| 99精品国产91久久久久久 | www.日韩在线| 懂色中文一区二区在线播放| 国产成人精品1024| 成人av网址在线| jlzzjlzz亚洲女人18| 色综合天天性综合| 在线观看免费成人| 欧美日韩国产首页| 日韩视频在线观看一区二区| 久久婷婷国产综合国色天香| 国产亚洲1区2区3区| 国产精品国产三级国产aⅴ中文| 国产精品久久久久久福利一牛影视| 国产精品久久久久久久岛一牛影视| 一区在线观看免费| 亚洲综合999| 免费在线观看不卡| 国内成人自拍视频| 99精品视频中文字幕| 欧美色精品在线视频| 欧美电视剧免费观看| 国产精品网站在线播放| 亚洲综合色在线| 免费看日韩精品| 成人污污视频在线观看| 91老师片黄在线观看| 欧美精选一区二区| 国产拍欧美日韩视频二区| 亚洲欧洲精品一区二区三区| 亚洲小少妇裸体bbw| 国产一区二区免费视频| 91香蕉视频mp4| 欧美一区二区性放荡片| 中文在线一区二区| 午夜精品久久久久久不卡8050 | 在线观看亚洲专区| 欧美一区午夜视频在线观看 | 欧美激情一区二区在线| 亚洲精品va在线观看| 美女视频黄频大全不卡视频在线播放| 国产高清精品久久久久| 欧美亚男人的天堂| 久久精品亚洲乱码伦伦中文| 亚洲午夜在线电影| 国产a精品视频| 欧美日本一区二区在线观看| 日本一区二区综合亚洲| 日欧美一区二区| av一区二区三区黑人| 亚洲综合免费观看高清在线观看| 韩国精品在线观看| 91黄色免费观看| 久久久99免费| 日韩av午夜在线观看| 色综合视频在线观看| 久久久五月婷婷| 图片区小说区区亚洲影院| 99国产精品久久久久久久久久| 精品国产免费久久| 天堂一区二区在线免费观看| 99久久99久久综合| 国产女人水真多18毛片18精品视频| 日韩国产精品久久久久久亚洲| 色婷婷综合激情| 国产精品视频一区二区三区不卡| 蜜臀91精品一区二区三区| 欧美日韩国产在线观看| 亚洲精品欧美二区三区中文字幕| 国产99久久精品| 欧美mv和日韩mv国产网站| 五月天激情综合| 色美美综合视频| 亚洲欧洲精品一区二区精品久久久| 国产精品一卡二卡| 精品国产免费一区二区三区香蕉| 婷婷综合久久一区二区三区| 欧美亚洲丝袜传媒另类| 亚洲激情成人在线| 成a人片亚洲日本久久| 日本一区二区三区高清不卡| 国产综合久久久久久鬼色| 日韩亚洲欧美中文三级| 日韩精品一区第一页| 欧美欧美午夜aⅴ在线观看| 一区二区三区久久| 91黄色激情网站| 亚洲精品免费视频| 色婷婷精品大在线视频| 一区二区三区在线观看国产| 色婷婷国产精品| 亚洲影院久久精品| 欧美日本韩国一区| 丝袜亚洲另类欧美| 日韩一区二区三免费高清| 免费观看在线综合色| 欧美成人国产一区二区| 狠狠色丁香久久婷婷综| 久久婷婷色综合| 成人午夜电影久久影院| 国产精品久久久久三级| 91香蕉视频污在线| 亚洲一区在线观看免费观看电影高清| 在线观看网站黄不卡| 亚洲小说欧美激情另类| 91 com成人网| 激情偷乱视频一区二区三区| 久久久国产午夜精品| 成人性生交大片免费看中文| 亚洲少妇中出一区| 欧美区在线观看| 久久aⅴ国产欧美74aaa| 国产免费观看久久| 色天使色偷偷av一区二区| 午夜久久久久久久久| 日韩欧美国产麻豆| 久久嫩草精品久久久精品| 福利一区在线观看| 亚洲精品ww久久久久久p站| 欧美久久久久久蜜桃| 狠狠狠色丁香婷婷综合激情| 国产精品久久久久影院色老大| 色哟哟国产精品免费观看| 性做久久久久久久免费看| 亚洲精品一区二区三区四区高清| 成人一区二区在线观看| 亚洲高清免费观看| 久久久久久电影| 在线亚洲人成电影网站色www| 免费精品99久久国产综合精品| 日本一区二区三区高清不卡| 欧美最猛黑人xxxxx猛交| 美女视频免费一区| 亚洲欧美在线aaa| 欧美一区二区三区性视频| 岛国一区二区三区| 日韩成人精品在线| 中文久久乱码一区二区| 4438成人网| 成人久久18免费网站麻豆| 青青草国产精品97视觉盛宴| 国产精品网站在线| 日韩视频免费观看高清完整版在线观看 | 欧美日韩国产综合一区二区三区 | 欧美日韩色一区| 国产高清成人在线| 午夜av电影一区| 亚洲欧洲日韩在线| 日韩片之四级片| 色综合 综合色| 国产精品69毛片高清亚洲| 亚洲成人免费在线观看| 欧美国产成人精品| 日韩欧美国产成人一区二区| 欧洲生活片亚洲生活在线观看| 国产精品一级片在线观看| 丝袜美腿亚洲一区二区图片| 日韩理论片在线| 久久亚洲捆绑美女|