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

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

?? demgmm1.m

?? Bayes網絡工具箱
?? M
字號:
%DEMGMM1 Demonstrate EM for Gaussian mixtures.%%	Description%	This script demonstrates the use of the EM algorithm to fit a mixture%	of Gaussians to a set of data using maximum likelihood. A colour%	coding scheme is used to illustrate the evaluation of the posterior%	probabilities in the E-step of the EM algorithm.%%	See also%	DEMGMM2, DEMGMM3, DEMGMM4, GMM, GMMEM, GMMPOST%%	Copyright (c) Christopher M Bishop, Ian T Nabney (1996, 1997)clc;disp('This demonstration illustrates the use of the EM (expectation-')disp('maximization) algorithm for fitting of a mixture of Gaussians to a')disp('data set by maximum likelihood.')disp(' ')disp('The data set consists of 40 data points in a 2-dimensional')disp('space, generated by sampling from a mixture of 2 Gaussian')disp('distributions.')disp(' ')disp('Press any key to see a plot of the data.')pause;% Generate the datarandn('state', 0); rand('state', 0);ndat1 = 20; ndat2 = 20; ndata = ndat1+ndat2;mu1 = [0.3 0.3]'; mu2 = [0.7 0.7]'; sig1 = 0.01; sig2 = 0.01;x1 = gsamp(mu1, sig1*eye(2), ndat1);x2 = gsamp(mu2, sig2*eye(2), ndat2);x = [x1; x2];h = figure;hd = plot(x(:, 1), x(:, 2), '.g', 'markersize', 30);hold on; axis([0 1 0 1]); axis square; set(gca, 'box', 'on');ht = text(0.5, 1.05, 'Data', 'horizontalalignment', 'center');disp(' ');disp('Press any key to continue.')pause; clc;disp('We next create and initialize a mixture model consisting of a mixture')disp('of 2 Gaussians having ''spherical'' covariance matrices, using the')disp('function GMM. The Gaussian components can be displayed on the same')disp('plot as the data by drawing a contour of constant probability density')disp('for each component having radius equal to the corresponding standard')disp('deviation. Component 1 is coloured red and component 2 is coloured')disp('blue.')disp(' ')disp('Note that a particulary poor choice of initial parameters has been')disp('made in order to illustrate more effectively the operation of the')disp('EM algorithm.')disp(' ')disp('Press any key to see the initial configuration of the mixture model.')pause;% Set up mixture modelncentres = 2; input_dim = 2;mix = gmm(input_dim, ncentres, 'spherical');% Initialise the mixture modelmix.centres = [0.2 0.8; 0.8, 0.2];mix.covars = [0.01 0.01];% Plot the initial modelncirc = 30; theta = linspace(0, 2*pi, ncirc);xs = cos(theta); ys = sin(theta);xvals = mix.centres(:, 1)*ones(1,ncirc) + sqrt(mix.covars')*xs;yvals = mix.centres(:, 2)*ones(1,ncirc) + sqrt(mix.covars')*ys;hc(1)=line(xvals(1,:), yvals(1,:), 'color', 'r');hc(2)=line(xvals(2,:), yvals(2,:), 'color', 'b');set(ht, 'string', 'Initial Configuration');figure(h);disp(' ')disp('Press any key to continue'); pause; clc;disp('Now we adapt the parameters of the mixture model iteratively using the')disp('EM algorithm. Each cycle of the EM algorithm consists of an E-step')disp('followed by an M-step.  We start with the E-step, which involves the')disp('evaluation of the posterior probabilities (responsibilities) which the')disp('two components have for each of the data points.')disp(' ')disp('Since we have labelled the two components using the colours red and')disp('blue, a convenient way to indicate the value of a posterior')disp('probability for a given data point is to colour the point using a')disp('scale ranging from pure red (corresponding to a posterior probability')disp('of 1.0 for the red component and 0.0 for the blue component) through')disp('to pure blue.')disp(' ')disp('Press any key to see the result of applying the first E-step.')pause;% Initial E-step.set(ht, 'string', 'E-step');post = gmmpost(mix, x);dcols = [post(:,1), zeros(ndata, 1), post(:,2)];delete(hd); for i = 1 : ndata  hd(i) = plot(x(i, 1), x(i, 2), 'color', dcols(i,:), ...          'marker', '.', 'markersize', 30);endfigure(h);disp(' ');disp('Press any key to continue')pause; clc;disp('Next we perform the corresponding M-step. This involves replacing the')disp('centres of the component Gaussians by the corresponding weighted means')disp('of the data. Thus the centre of the red component is replaced by the')disp('mean of the data set, in which each data point is weighted according to')disp('the amount of red ink (corresponding to the responsibility of')disp('component 1 for explaining that data point). The variances and mixing')disp('proportions of the two components are similarly re-estimated.')disp(' ')disp('Press any key to see the result of applying the first M-step.')pause;% M-step.set(ht, 'string', 'M-step');options = foptions; options(14) = 1; % A single iterationoptions(1) = -1; % Switch off all messages, including warningmix = gmmem(mix, x, options);delete(hc);xvals = mix.centres(:, 1)*ones(1,ncirc) + sqrt(mix.covars')*xs;yvals = mix.centres(:, 2)*ones(1,ncirc) + sqrt(mix.covars')*ys;hc(1)=line(xvals(1,:), yvals(1,:), 'color', 'r');hc(2)=line(xvals(2,:), yvals(2,:), 'color', 'b');figure(h);disp(' ')disp('Press any key to continue')pause; clc;disp('We can continue making alternate E and M steps until the changes in')disp('the log likelihood at each cycle become sufficiently small.')disp(' ')disp('Press any key to see an animation of a further 9 EM cycles.')pause;figure(h);% Loop over EM iterations.numiters = 9;for n = 1 : numiters  set(ht, 'string', 'E-step');  post = gmmpost(mix, x);  dcols = [post(:,1), zeros(ndata, 1), post(:,2)];  delete(hd);   for i = 1 : ndata    hd(i) = plot(x(i, 1), x(i, 2), 'color', dcols(i,:), ...                 'marker', '.', 'markersize', 30);  end  pause(1)  set(ht, 'string', 'M-step');  [mix, options] = gmmem(mix, x, options);  fprintf(1, 'Cycle %4d  Error %11.6f\n', n, options(8));  delete(hc);  xvals = mix.centres(:, 1)*ones(1,ncirc) + sqrt(mix.covars')*xs;  yvals = mix.centres(:, 2)*ones(1,ncirc) + sqrt(mix.covars')*ys;  hc(1)=line(xvals(1,:), yvals(1,:), 'color', 'r');  hc(2)=line(xvals(2,:), yvals(2,:), 'color', 'b');  pause(1)enddisp(' ');disp('Press any key to end.')pause; clc; close(h); clear all

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚欧色一区w666天堂| 91免费版pro下载短视频| 成人av在线播放网址| 欧美日韩国产综合久久| 欧美极品另类videosde| 全部av―极品视觉盛宴亚洲| 成人网在线播放| 精品久久一二三区| 婷婷亚洲久悠悠色悠在线播放| av亚洲精华国产精华| 久久久久久一二三区| 欧美aⅴ一区二区三区视频| 欧美精品久久99| 国产精品毛片久久久久久| 国产在线精品一区二区夜色| 欧美日韩aaaaaa| 一区二区三区四区五区视频在线观看| 国产成人福利片| 精品剧情v国产在线观看在线| 三级一区在线视频先锋| 在线观看三级视频欧美| 国产精品久久久久久久浪潮网站| 激情综合网激情| 日韩一级二级三级| 喷白浆一区二区| 欧美福利视频一区| 午夜视频在线观看一区二区三区 | 欧美亚洲综合在线| 亚洲天堂久久久久久久| 99久久免费视频.com| 中文字幕一区二区三区不卡| 国产99久久久国产精品免费看 | 91美女片黄在线观看91美女| 国产精品萝li| 91免费视频网| 亚洲国产精品尤物yw在线观看| 欧美视频在线观看一区| 日韩高清在线观看| 欧美成人三级在线| 国产精品一区二区你懂的| 日本一区二区三区四区| 高清不卡在线观看| 亚洲免费观看在线观看| 欧美性xxxxxx少妇| 免费看欧美女人艹b| 久久青草欧美一区二区三区| 成人黄色综合网站| 亚洲黄色小视频| 欧美高清激情brazzers| 狠狠网亚洲精品| 久久久蜜桃精品| 91麻豆国产香蕉久久精品| 国产精品福利在线播放| 在线观看日韩精品| 激情偷乱视频一区二区三区| 国产日韩欧美麻豆| 色婷婷亚洲婷婷| 欧美aaaaaa午夜精品| 国产片一区二区| 欧美三级中文字| 久久精品国产999大香线蕉| 国产精品美女久久久久av爽李琼 | av动漫一区二区| 亚洲午夜免费电影| 精品久久人人做人人爱| 色婷婷综合视频在线观看| 久久精品国产77777蜜臀| 中文字幕中文乱码欧美一区二区| 欧美老肥妇做.爰bbww视频| 国产精品12区| 亚洲成人动漫精品| 国产欧美精品国产国产专区 | 91视视频在线直接观看在线看网页在线看| 亚洲欧洲性图库| 日韩欧美精品在线视频| 在线一区二区三区做爰视频网站| 久草精品在线观看| 亚洲永久免费av| 国产精品乱码人人做人人爱| 欧美一级一区二区| 91视频观看视频| 国产精品综合二区| 视频一区在线视频| 一区二区三区在线观看欧美| 欧美经典三级视频一区二区三区| 91精品国产综合久久久久久久| 99久久99久久久精品齐齐| 国产精品一级黄| 经典三级视频一区| 视频一区二区三区在线| 夜夜揉揉日日人人青青一国产精品| 久久精品一区二区三区不卡| 日韩一区二区免费高清| 欧美怡红院视频| 91久久香蕉国产日韩欧美9色| 色呦呦网站一区| 国产成人自拍高清视频在线免费播放| 丝袜脚交一区二区| 亚洲成av人片| 亚洲激情中文1区| 国产精品久久午夜夜伦鲁鲁| 一本色道a无线码一区v| 精品综合久久久久久8888| 亚洲永久免费av| 一区二区三区精品久久久| 国产精品理论在线观看| 国产无遮挡一区二区三区毛片日本| 欧美一区二区三区系列电影| 欧美二区在线观看| 欧美日韩一区视频| 欧美日韩国产一级片| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 337p日本欧洲亚洲大胆精品| 日韩欧美一级二级| 日韩欧美一区二区三区在线| 欧美卡1卡2卡| 欧美一级在线观看| 欧美不卡123| 亚洲精品一线二线三线| 精品久久久影院| 欧美经典一区二区三区| 亚洲国产精品成人综合| 中文字幕一区二区三区在线观看 | 这里只有精品99re| 欧美一区二区精美| 久久久久国产精品人| 国产精品美女一区二区三区| 国产精品乱码一区二三区小蝌蚪| 日韩理论电影院| 亚洲一区二区视频在线观看| 视频一区二区中文字幕| 精品一区二区影视| 成人av在线网| 欧美色偷偷大香| 欧美一级高清片在线观看| 精品成人在线观看| 国产精品久久综合| 夜夜夜精品看看| 久久91精品国产91久久小草| 成人av网站在线观看免费| 91免费观看视频| 日韩精品一区二区三区视频在线观看| 26uuu欧美| 亚洲精品成人天堂一二三| 天堂蜜桃一区二区三区 | 国产一区二区三区国产| 99久久精品国产导航| 91精品国产色综合久久不卡电影| www国产成人免费观看视频 深夜成人网| 国产精品污网站| 亚洲va中文字幕| 成人午夜av电影| 欧美久久久久久蜜桃| 国产精品久久久久一区| 日韩黄色免费网站| 成人午夜免费av| 91精品国产综合久久久蜜臀粉嫩| 中文字幕亚洲不卡| 人人精品人人爱| 色综合天天视频在线观看| 欧美mv和日韩mv国产网站| 亚洲黄色免费网站| 成人精品小蝌蚪| 日韩一区二区免费视频| 一区二区三区日韩| 国产99久久久国产精品免费看 | 韩国三级在线一区| 色伊人久久综合中文字幕| 国产亚洲视频系列| 天堂va蜜桃一区二区三区漫画版| 成人性生交大片免费看中文网站| 宅男噜噜噜66一区二区66| 最新高清无码专区| 懂色av一区二区夜夜嗨| 欧美www视频| 婷婷国产v国产偷v亚洲高清| 99久久精品99国产精品| 久久免费的精品国产v∧| 日韩av网站在线观看| 欧美在线免费播放| 国产精品不卡在线| 国产剧情一区二区三区| 欧美一级生活片| 亚洲国产成人高清精品| 91在线观看成人| 亚洲图片激情小说| 岛国av在线一区| 久久久久久免费毛片精品| 精品一区二区三区在线观看| 欧美一区二区三区免费在线看| 又紧又大又爽精品一区二区| 91女神在线视频| 国产精品国产自产拍高清av| 成人免费观看男女羞羞视频| 国产日韩影视精品| 成人性生交大片| 亚洲国产高清在线观看视频| 国产999精品久久| 中文一区在线播放| eeuss国产一区二区三区|