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

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

?? demev2.m

?? this is also good for learning SVM algorithm
?? M
字號:
%DEMEV2	Demonstrate Bayesian classification for the MLP.%%	Description%	A synthetic two class two-dimensional dataset X is sampled  from a%	mixture of four Gaussians.  Each class is associated with two of the%	Gaussians so that the optimal decision boundary is non-linear. A 2-%	layer network with logistic outputs is trained by minimizing the%	cross-entropy error function with isotroipc Gaussian regularizer (one%	hyperparameter for each of the four standard weight groups), using%	the scaled conjugate gradient optimizer. The hyperparameter vectors%	ALPHA and BETA are re-estimated using the function EVIDENCE. A graph%	is plotted of the optimal, regularised, and unregularised decision%	boundaries.  A further plot of the moderated versus unmoderated%	contours is generated.%%	See also%	EVIDENCE, MLP, SCG, DEMARD, DEMMLP2%%	Copyright (c) Ian T Nabney (1996-2001)clc;disp('This program demonstrates the use of the evidence procedure on')disp('a two-class problem.  It also shows the improved generalisation')disp('performance that can be achieved with moderated outputs; that is')disp('predictions where an approximate integration over the true')disp('posterior distribution is carried out.')disp(' ')disp('First we generate a synthetic dataset with two-dimensional input')disp('sampled from a mixture of four Gaussians.  Each class is')disp('associated with two of the Gaussians so that the optimal decision')disp('boundary is non-linear.')disp(' ')disp('Press any key to see a plot of the data.')pause;% Generate the matrix of inputs x and targets t.rand('state', 423);randn('state', 423);ClassSymbol1 = 'r.';ClassSymbol2 = 'y.';PointSize = 12;titleSize = 10;fh1 = figure;set(fh1, 'Name', 'True Data Distribution');whitebg(fh1, 'k');% % Generate the data% n=200;% Set up mixture model: 2d data with four centres% Class 1 is first two centres, class 2 from the other twomix = gmm(2, 4, 'full');mix.priors = [0.25 0.25 0.25 0.25];mix.centres = [0 -0.1; 1.5 0; 1 1; 1 -1];mix.covars(:,:,1) = [0.625 -0.2165; -0.2165 0.875];mix.covars(:,:,2) = [0.25 0; 0 0.25];mix.covars(:,:,3) = [0.2241 -0.1368; -0.1368 0.9759];mix.covars(:,:,4) = [0.2375 0.1516; 0.1516 0.4125];[data, label] = gmmsamp(mix, n);% % Calculate some useful axis limits% x0 = min(data(:,1));x1 = max(data(:,1));y0 = min(data(:,2));y1 = max(data(:,2));dx = x1-x0;dy = y1-y0;expand = 5/100;			% Add on 5 percent each wayx0 = x0 - dx*expand;x1 = x1 + dx*expand;y0 = y0 - dy*expand;y1 = y1 + dy*expand;resolution = 100;step = dx/resolution;xrange = [x0:step:x1];yrange = [y0:step:y1];% 					% Generate the grid% [X Y]=meshgrid([x0:step:x1],[y0:step:y1]);% % Calculate the class conditional densities, the unconditional densities and% the posterior probabilities% px_j = gmmactiv(mix, [X(:) Y(:)]);px = reshape(px_j*(mix.priors)',size(X));post = gmmpost(mix, [X(:) Y(:)]);p1_x = reshape(post(:, 1) + post(:, 2), size(X));p2_x = reshape(post(:, 3) + post(:, 4), size(X));plot(data((label<=2),1),data(label<=2,2),ClassSymbol1, 'MarkerSize', ...PointSize)hold onaxis([x0 x1 y0 y1])plot(data((label>2),1),data(label>2,2),ClassSymbol2, 'MarkerSize', ...    PointSize)% Convert targets to 0-1 encodingtarget=[label<=2];disp(' ')disp('Press any key to continue')pause; clc;disp('Next we create a two-layer MLP network with 6 hidden units and')disp('one logistic output.  We use a separate inverse variance')disp('hyperparameter for each group of weights (inputs, input bias,')disp('outputs, output bias) and the weights are optimised with the')disp('scaled conjugate gradient algorithm.  After each 100 iterations')disp('the hyperparameters are re-estimated twice.  There are eight')disp('cycles of the whole algorithm.')disp(' ')disp('Press any key to train the network and determine the hyperparameters.')pause;% Set up network parameters.nin = 2;		% Number of inputs.nhidden = 6;		% Number of hidden units.nout = 1;		% Number of outputs.alpha = 0.01;		% Initial prior hyperparameter.aw1 = 0.01;ab1 = 0.01;aw2 = 0.01;ab2 = 0.01;% Create and initialize network weight vector.prior = mlpprior(nin, nhidden, nout, aw1, ab1, aw2, ab2);net = mlp(nin, nhidden, nout, 'logistic', prior);% Set up vector of options for the optimiser.nouter = 8;			% Number of outer loops.ninner = 2;			% Number of innter loops.options = foptions;		% Default options vector.options(1) = 1;			% This provides display of error values.options(2) = 1.0e-5;		% Absolute precision for weights.options(3) = 1.0e-5;		% Precision for objective function.options(14) = 100;		% Number of training cycles in inner loop. % Train using scaled conjugate gradients, re-estimating alpha and beta.for k = 1:nouter  net = netopt(net, options, data, target, 'scg');  [net, gamma] = evidence(net, data, target, ninner);  fprintf(1, '\nRe-estimation cycle %d:\n', k);  disp(['  alpha = ', num2str(net.alpha')]);  fprintf(1, '  gamma =  %8.5f\n\n', gamma);  disp(' ')  disp('Press any key to continue.')  pause;enddisp(' ')disp('Network training and hyperparameter re-estimation are now complete.')disp('Notice that the final error value is close to the number of data')disp(['points (', num2str(n), ') divided by two.'])disp('Also, the hyperparameter values differ, which suggests that a single')disp('hyperparameter would not be so effective.')disp(' ')disp('First we train an MLP without Bayesian regularisation on the')disp('same dataset using 400 iterations of scaled conjugate gradient')disp(' ')disp('Press any key to train the network by maximum likelihood.')pause;% Train standard networknet2 = mlp(nin, nhidden, nout, 'logistic');options(14) = 400;net2 = netopt(net2, options, data, target, 'scg');y2g = mlpfwd(net2, [X(:), Y(:)]);y2g = reshape(y2g(:, 1), size(X));disp(' ')disp('We can now plot the function represented by the trained networks.')disp('We show the decision boundaries (output = 0.5) and the optimal')disp('decision boundary given by applying Bayes'' theorem to the true')disp('data model.')disp(' ')disp('Press any key to add the boundaries to the plot.')pause;% Evaluate predictions.[yg, ymodg] = mlpevfwd(net, data, target, [X(:) Y(:)]);yg = reshape(yg(:,1),size(X));ymodg = reshape(ymodg(:,1),size(X));% Bayesian decision boundary[cB, hB] = contour(xrange,yrange,p1_x,[0.5 0.5],'b-');[cNb, hNb] = contour(xrange,yrange,yg,[0.5 0.5],'r-');[cN, hN] = contour(xrange,yrange,y2g,[0.5 0.5],'g-');set(hB, 'LineWidth', 2);set(hNb, 'LineWidth', 2);set(hN, 'LineWidth', 2);Chandles = [hB(1) hNb(1) hN(1)];legend(Chandles, 'Bayes', ...  'Reg. Network', 'Network', 3);disp(' ')disp('Note how the regularised network predictions are closer to the')disp('optimal decision boundary, while the unregularised network is')disp('overtrained.')disp(' ')disp('We will now compare moderated and unmoderated outputs for the');disp('regularised network by showing the contour plot of the posterior')disp('probability estimates.')disp(' ')disp('The first plot shows the regularised (moderated) predictions')disp('and the second shows the standard predictions from the same network.')disp('These agree at the level 0.5.')disp('Press any key to continue')pauselevels = 0:0.1:1;fh4 = figure;set(fh4, 'Name', 'Moderated outputs');hold onplot(data((label<=2),1),data(label<=2,2),'r.', 'MarkerSize', PointSize)plot(data((label>2),1),data(label>2,2),'y.', 'MarkerSize', PointSize)[cNby, hNby] = contour(xrange, yrange, ymodg, levels, 'k-');set(hNby, 'LineWidth', 1);fh5 = figure;set(fh5, 'Name', 'Unmoderated outputs');hold onplot(data((label<=2),1),data(label<=2,2),'r.', 'MarkerSize', PointSize)plot(data((label>2),1),data(label>2,2),'y.', 'MarkerSize', PointSize)[cNbm, hNbm] = contour(xrange, yrange, yg, levels, 'k-');set(hNbm, 'LineWidth', 1);disp(' ')disp('Note how the moderated contours are more widely spaced.  This shows')disp('that there is a larger region where the outputs are close to 0.5')disp('and a smaller region where the outputs are close to 0 or 1.')disp(' ')disp('Press any key to exit')pauseclose(fh1);close(fh4);close(fh5);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产午夜精品在线观看| 国产自产高清不卡| 国产精品亚洲一区二区三区妖精| 成人伦理片在线| 日韩一级黄色片| 亚洲色图第一区| 国产一区二区三区在线观看免费视频 | 中文字幕在线观看一区| 午夜精品免费在线观看| 不卡一卡二卡三乱码免费网站 | 91在线国产福利| 精品国产污网站| 日韩电影在线观看网站| 91啪九色porn原创视频在线观看| 欧美mv日韩mv国产| 天天综合色天天综合色h| 色综合欧美在线视频区| 久久久九九九九| 爽好久久久欧美精品| 日本韩国欧美国产| 自拍偷拍国产精品| www.亚洲色图.com| 国产欧美日产一区| 国产高清精品在线| 国产亚洲一区二区在线观看| 久久国产精品99久久人人澡| 欧美日韩日本视频| 亚洲一区二区三区四区的| 色综合天天天天做夜夜夜夜做| 久久久久久夜精品精品免费| 九九九精品视频| 欧美精品1区2区| 午夜精品一区在线观看| 欧美日韩久久久一区| 亚洲大片在线观看| 欧美欧美欧美欧美| 麻豆91在线播放免费| 欧美日韩激情一区二区| 亚洲一区二区三区四区在线| 欧美亚一区二区| 亚洲高清久久久| 91精品国产一区二区三区香蕉| 午夜激情一区二区三区| 欧美日韩三级视频| 欧美a级一区二区| 日韩欧美一级片| 毛片av一区二区三区| 欧美电视剧在线看免费| 激情六月婷婷久久| 国产欧美日韩另类一区| av高清久久久| 一个色妞综合视频在线观看| 在线不卡欧美精品一区二区三区| 香蕉加勒比综合久久| 欧美一级片免费看| 国产综合久久久久久久久久久久| 国产精品无圣光一区二区| 99视频超级精品| 亚洲国产精品人人做人人爽| 正在播放一区二区| 国产激情一区二区三区四区 | 亚洲精品一区二区三区香蕉| 国产精品1区2区3区| 亚洲欧洲性图库| 欧美色大人视频| 国产在线视视频有精品| 国产精品久久久久四虎| 欧美日韩电影在线播放| 国产一区二区三区蝌蚪| 国产精品不卡在线| 欧美日韩综合在线免费观看| 国产精品一二三区在线| 国产精品福利一区二区三区| 欧美日本在线一区| 国产999精品久久久久久绿帽| 亚洲精品国产精品乱码不99| 欧美一卡二卡三卡| av亚洲精华国产精华| 日本sm残虐另类| 亚洲欧美另类综合偷拍| 精品日韩成人av| 欧美视频在线一区| 成人免费va视频| 日韩精品亚洲专区| 亚洲欧美成人一区二区三区| 久久亚洲精品小早川怜子| 欧美日韩一级二级三级| www.视频一区| 久久99国内精品| 一区二区三区久久| 国产色91在线| 日韩一级在线观看| 日本精品免费观看高清观看| 国产成人综合亚洲91猫咪| 天天色天天操综合| 亚洲午夜一区二区| 自拍av一区二区三区| 久久久五月婷婷| 久久综合久久综合久久| 欧美亚洲综合一区| 91在线一区二区三区| 国产成人免费高清| 国产一区视频导航| 日本不卡高清视频| 日本人妖一区二区| 亚洲成人福利片| 亚洲午夜国产一区99re久久| 亚洲欧美日韩中文字幕一区二区三区 | 91麻豆福利精品推荐| 国产91富婆露脸刺激对白| 国产资源在线一区| 精品一区二区三区日韩| 性做久久久久久久久| 亚洲综合999| 一区二区三区在线看| 亚洲欧美视频在线观看| 亚洲婷婷在线视频| 亚洲视频香蕉人妖| 最近中文字幕一区二区三区| 国产精品久久久久aaaa| 国产无一区二区| 中文无字幕一区二区三区| 亚洲国产成人一区二区三区| 国产性天天综合网| 中文成人综合网| 亚洲欧洲成人av每日更新| 亚洲欧美在线高清| 一区二区三区四区亚洲| 亚洲综合男人的天堂| 亚洲线精品一区二区三区 | 亚洲人成亚洲人成在线观看图片| 国产欧美日本一区视频| 中文字幕精品三区| 亚洲人成小说网站色在线 | 在线不卡中文字幕| 欧美大片免费久久精品三p| 久久综合久色欧美综合狠狠| 国产精品午夜久久| 一区二区三区影院| 免费欧美日韩国产三级电影| 国产精一区二区三区| 99久久综合狠狠综合久久| 欧美色精品在线视频| 精品国偷自产国产一区| 国产精品情趣视频| 亚洲福利一区二区| 狠狠色丁香婷婷综合| av成人免费在线| 9191国产精品| 欧美激情一区二区三区四区| 亚洲综合清纯丝袜自拍| 九色综合狠狠综合久久| 色综合视频在线观看| 日韩三级在线免费观看| 国产精品麻豆久久久| 午夜国产精品一区| 国产精品香蕉一区二区三区| 欧美亚洲免费在线一区| 2021久久国产精品不只是精品| 亚洲欧洲性图库| 蜜桃精品视频在线| 色婷婷精品久久二区二区蜜臂av| 日韩一区二区不卡| 亚洲男人都懂的| 国内成人免费视频| 欧美日精品一区视频| 欧美国产精品一区二区三区| 首页国产丝袜综合| 91理论电影在线观看| 久久伊人中文字幕| 午夜精品久久久久久不卡8050| 成人久久久精品乱码一区二区三区| 91黄色免费版| 欧美国产成人精品| 久久99国产精品尤物| 欧美伊人精品成人久久综合97 | 亚洲综合视频在线| 高清视频一区二区| 精品国产91久久久久久久妲己| 亚洲国产cao| 91麻豆精东视频| 国产视频一区不卡| 国精产品一区一区三区mba视频| 91精品国产综合久久精品图片| 亚洲精品成人精品456| 粉嫩在线一区二区三区视频| 欧美精品一区二区三区一线天视频| 无码av中文一区二区三区桃花岛| 不卡视频在线看| 欧美国产乱子伦| 国产成a人无v码亚洲福利| 精品国产一区二区三区久久影院 | 自拍视频在线观看一区二区| 国产精品一区在线观看乱码| 91精品国产综合久久久久久久久久| 亚洲狼人国产精品| 91九色最新地址| 一区二区三区欧美在线观看| 一本到三区不卡视频| 中文字幕一区二区三区av |