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

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

?? demgmm4.m

?? Bayes網絡工具箱
?? M
字號:
%DEMGMM2 Demonstrate density modelling with a Gaussian mixture model.%%	Description%	 The problem consists of modelling data generated by a mixture of%	three Gaussians in 2 dimensions with a mixture model using full%	covariance matrices.  The priors are 0.3, 0.5 and 0.2; the centres%	are (2, 3.5), (0, 0) and (0,2); the variances are (0.16, 0.64) axis%	aligned, (0.25, 1) rotated by 30 degrees and the identity matrix. The%	first figure contains a scatter plot of the data.%%	A Gaussian mixture model with three components is trained using EM.%	The parameter vector is printed before training and after training.%	The user should press any key to continue at these points.  The%	parameter vector consists of priors (the column), and centres (given%	as (x, y) pairs as the next two columns).  The covariance matrices%	are printed separately.%%	The second figure is a 3 dimensional view of the density function,%	while the third shows the axes of the 1-standard deviation ellipses%	for the three components of the mixture model.%%	See also%	GMM, GMMINIT, GMMEM, GMMPROB, GMMUNPAK%%	Copyright (c) Christopher M Bishop, Ian T Nabney (1996, 1997)% Generate the datandata = 500;% Fix the seeds for reproducible resultsrandn('state', 42);rand('state', 42);data = randn(ndata, 2);prior = [0.3 0.5 0.2];% Mixture model swaps clusters 1 and 3datap = [0.2 0.5 0.3];datac = [0 2; 0 0; 2 3.5];datacov = repmat(eye(2), [1 1 3]);data1 = data(1:prior(1)*ndata,:);data2 = data(prior(1)*ndata+1:(prior(2)+prior(1))*ndata, :);data3 = data((prior(1)+prior(2))*ndata +1:ndata, :);% First cluster has axis aligned variance and centre (2, 3.5)data1(:, 1) = data1(:, 1)*0.4 + 2.0;data1(:, 2) = data1(:, 2)*0.8 + 3.5;datacov(:, :, 3) = [0.4*0.4 0; 0 0.8*0.8];% Second cluster has variance axes rotated by 30 degrees and centre (0, 0)rotn = [cos(pi/6) -sin(pi/6); sin(pi/6) cos(pi/6)];data2(:,1) = data2(:, 1)*0.5;data2 = data2*rotn;datacov(:, :, 2) = rotn' * [0.25 0; 0 1] * rotn;% Third cluster is at (0,2)data3 = data3 + repmat([0 2], prior(3)*ndata, 1);% Put the dataset together againdata = [data1; data2; data3];clcdisp('This demonstration illustrates the use of a Gaussian mixture model')disp('with full covariance matrices to approximate the unconditional ')disp('probability density of data in a two-dimensional space.')disp('We begin by generating the data from a mixture of three Gaussians and')disp('plotting it.')disp(' ')disp('The first cluster has axis aligned variance and centre (0, 2).')disp('The second cluster has variance axes rotated by 30 degrees')disp('and centre (0, 0).  The third cluster has unit variance and centre')disp('(2, 3.5).')disp(' ')disp('Press any key to continue.')pausefh1 = figure;plot(data(:, 1), data(:, 2), 'o')set(gca, 'Box', 'on')% Set up mixture modelncentres = 3;input_dim = 2;mix = gmm(input_dim, ncentres, 'full');% Initialise the model parameters from the dataoptions = foptions;options(14) = 5;	% Just use 5 iterations of k-means in initialisationmix = gmminit(mix, data, options);% Print out modelclcdisp('The mixture model has three components and full covariance')disp('matrices.  The model parameters after initialisation using the')disp('k-means algorithm are as follows')disp('    Priors        Centres')disp([mix.priors' mix.centres])disp('Covariance matrices are')disp(mix.covars)disp('Press any key to continue.')pause% Set up vector of options for EM traineroptions = zeros(1, 18);options(1)  = 1;		% Prints out error values.options(14) = 50;		% Number of iterations.disp('We now train the model using the EM algorithm for 50 iterations.')disp(' ')disp('Press any key to continue.')pause[mix, options, errlog] = gmmem(mix, data, options);% Print out modeldisp(' ')disp('The trained model has priors and centres:')disp('    Priors        Centres')disp([mix.priors' mix.centres])disp('The data generator has priors and centres')disp('    Priors        Centres')disp([datap' datac])disp('Model covariance matrices are')disp(mix.covars(:, :, 1))disp(mix.covars(:, :, 2))disp(mix.covars(:, :, 3))disp('Data generator covariance matrices are')disp(datacov(:, :, 1))disp(datacov(:, :, 2))disp(datacov(:, :, 3))disp('Note the close correspondence between these parameters and those')disp('of the distribution used to generate the data.  The match for')disp('covariance matrices is not that close, but would be improved with')disp('more iterations of the training algorithm.')disp(' ')disp('Press any key to continue.')pauseclcdisp('We now plot the density given by the mixture model as a surface plot.')disp(' ')disp('Press any key to continue.')pause% Plot the resultx = -4.0:0.2:5.0;y = -4.0:0.2:5.0;[X, Y] = meshgrid(x,y);X = X(:);Y = Y(:);grid = [X Y];Z = gmmprob(mix, grid);Z = reshape(Z, length(x), length(y));c = mesh(x, y, Z);hold ontitle('Surface plot of probability density')hold offdrawnowclcdisp('The final plot shows the centres and widths, given by one standard')disp('deviation, of the three components of the mixture model.  The axes')disp('of the ellipses of constant density are shown.')disp(' ')disp('Press any key to continue.')pause% Try to calculate a sensible position for the second figure, below the firstfig1_pos = get(fh1, 'Position');fig2_pos = fig1_pos;fig2_pos(2) = fig2_pos(2) - fig1_pos(4) - 30;fh2 = figure('Position', fig2_pos);h3 = plot(data(:, 1), data(:, 2), 'bo');axis equal;hold ontitle('Plot of data and covariances')for i = 1:ncentres  [v,d] = eig(mix.covars(:,:,i));  for j = 1:2    % Ensure that eigenvector has unit length    v(:,j) = v(:,j)/norm(v(:,j));    start=mix.centres(i,:)-sqrt(d(j,j))*(v(:,j)');    endpt=mix.centres(i,:)+sqrt(d(j,j))*(v(:,j)');    linex = [start(1) endpt(1)];    liney = [start(2) endpt(2)];    line(linex, liney, 'Color', 'k', 'LineWidth', 3)  end  % Plot ellipses of one standard deviation  theta = 0:0.02:2*pi;  x = sqrt(d(1,1))*cos(theta);  y = sqrt(d(2,2))*sin(theta);  % Rotate ellipse axes  ellipse = (v*([x; y]))';  % Adjust centre  ellipse = ellipse + ones(length(theta), 1)*mix.centres(i,:);  plot(ellipse(:,1), ellipse(:,2), 'r-');endhold offdisp('Note how the data cluster positions and widths are captured by')disp('the mixture model.')disp(' ')disp('Press any key to end.')pauseclose(fh1);close(fh2);clear all; 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
福利电影一区二区| 欧美日韩成人综合在线一区二区 | 一区二区三区中文字幕| 日韩一级完整毛片| 一本大道久久a久久综合婷婷| 精品一区二区免费| 亚洲高清久久久| 亚洲天堂免费看| 精品国产乱码久久久久久1区2区| 在线日韩国产精品| av电影在线观看完整版一区二区| 精彩视频一区二区三区| 午夜精品成人在线| 亚洲少妇屁股交4| 国产视频一区二区在线| 日韩精品一区二区三区中文不卡 | 日韩一区二区在线看| 色呦呦网站一区| 成人高清免费在线播放| 国产精品中文字幕欧美| 久久成人免费网站| 欧美a一区二区| 亚洲成人精品影院| 亚洲国产精品精华液网站| 亚洲免费在线观看视频| 国产精品国产三级国产普通话蜜臀| 久久视频一区二区| 9191国产精品| 欧美理论电影在线| 欧美日韩在线三区| 欧美日韩一卡二卡| 欧美自拍偷拍午夜视频| 欧美性一二三区| 91黄色激情网站| 欧美在线短视频| 欧美视频一区二区在线观看| 色天使久久综合网天天| 日本韩国精品在线| 欧美最猛性xxxxx直播| 91国模大尺度私拍在线视频| 色婷婷精品大视频在线蜜桃视频| 色网综合在线观看| 欧美色中文字幕| 欧美精品久久一区| 日韩女优视频免费观看| 欧美videos中文字幕| 精品国产一区二区三区四区四 | 亚洲综合久久久| 亚洲一区二区在线观看视频 | 久久久精品国产免费观看同学| 久久久久一区二区三区四区| 国产欧美日韩另类一区| 日韩理论在线观看| 亚洲国产裸拍裸体视频在线观看乱了| 亚洲va韩国va欧美va| 日本va欧美va精品| 国产精品18久久久久久久网站| 国产99久久精品| 日本丰满少妇一区二区三区| 欧美色区777第一页| 欧美一区午夜视频在线观看 | 136国产福利精品导航| 亚洲女厕所小便bbb| 日韩和欧美一区二区三区| 青青草原综合久久大伊人精品 | 欧美一区二区三区人| 久久久亚洲精品一区二区三区| 国产精品美女久久久久久2018| 亚洲精品国产一区二区精华液| 五月天一区二区三区| 激情综合一区二区三区| 99精品国产99久久久久久白柏 | 中文字幕成人av| 亚洲精品国产精华液| 日韩av成人高清| 成人午夜免费av| 欧美精品乱码久久久久久| 久久免费午夜影院| 亚洲永久免费视频| 国产一区二区精品久久99| 99国产精品国产精品毛片| 欧美一区二区三区视频在线观看| 国产欧美精品一区二区三区四区| 亚洲精品福利视频网站| 久久99国产精品尤物| 色婷婷亚洲综合| 精品少妇一区二区三区日产乱码 | 国产ts人妖一区二区| 欧美日韩精品一区二区三区四区 | 日韩中文字幕一区二区三区| 国产福利一区二区三区视频在线| 欧美日韩精品一区二区天天拍小说| 久久综合色一综合色88| 亚洲一区在线观看免费观看电影高清 | 日本美女一区二区三区| av午夜一区麻豆| 久久夜色精品国产欧美乱极品| 亚洲精品欧美二区三区中文字幕| 国内精品免费**视频| 欧美调教femdomvk| 中文子幕无线码一区tr| 久久国产精品第一页| 欧美午夜精品久久久久久孕妇| 久久午夜免费电影| 日本不卡视频一二三区| 日本久久电影网| 国产精品狼人久久影院观看方式| 久久国产精品99久久久久久老狼| 欧美综合视频在线观看| 国产精品国产自产拍在线| 国产一区二区三区四| 日韩欧美国产一二三区| 亚洲国产精品自拍| 日本韩国一区二区三区| 中文字幕在线播放不卡一区| 国产成人亚洲综合a∨猫咪| 欧美xxxxx牲另类人与| 日韩国产精品久久久久久亚洲| 日本韩国一区二区| 伊人婷婷欧美激情| 91日韩在线专区| 1000部国产精品成人观看| 国产91高潮流白浆在线麻豆| 久久综合九色欧美综合狠狠 | 一本大道av一区二区在线播放| 中文幕一区二区三区久久蜜桃| 国产一区二三区好的| 日韩欧美国产wwwww| 男人的天堂久久精品| 91超碰这里只有精品国产| 日韩一区精品字幕| 欧美一区午夜视频在线观看 | 美国欧美日韩国产在线播放| 欧美疯狂性受xxxxx喷水图片| 亚洲图片欧美一区| 欧美无人高清视频在线观看| 亚洲午夜私人影院| 欧美三级中文字| 五月天久久比比资源色| 欧美卡1卡2卡| 蜜桃视频在线观看一区二区| 欧美一级午夜免费电影| 精品一区二区三区在线视频| 久久久久99精品国产片| 春色校园综合激情亚洲| 国产精品福利一区| 97se亚洲国产综合自在线观| 亚洲精品一二三| 欧美丰满少妇xxxxx高潮对白| 丝袜国产日韩另类美女| 日韩欧美精品在线视频| 国产在线看一区| 国产精品天美传媒| 日本精品视频一区二区| 日韩av高清在线观看| 久久亚洲春色中文字幕久久久| 丁香五精品蜜臀久久久久99网站| 日韩理论片网站| 欧美老年两性高潮| 国产精品99久久久久久久女警| 国产精品狼人久久影院观看方式| 在线视频一区二区免费| 蜜臀91精品一区二区三区| 国产亚洲成年网址在线观看| 91一区二区三区在线播放| 亚洲成人av在线电影| 精品国产凹凸成av人网站| 国产99久久精品| 亚洲电影视频在线| 337p日本欧洲亚洲大胆色噜噜| www.亚洲人| 视频一区在线视频| 中文字幕乱码亚洲精品一区| 欧美三片在线视频观看| 国产一区二区网址| 一区二区三区四区中文字幕| 亚洲国产精品久久不卡毛片| 日本高清成人免费播放| 日日摸夜夜添夜夜添精品视频| 成人国产精品免费观看| 性做久久久久久久免费看| 久久综合网色—综合色88| 在线免费观看日本一区| 九九视频精品免费| 夜夜嗨av一区二区三区四季av| 91精品国产综合久久精品图片 | 9191国产精品| 成人a免费在线看| 日本亚洲天堂网| 亚洲色图丝袜美腿| 欧美成人a视频| 在线观看视频91| 国产福利91精品| 日韩国产欧美一区二区三区| 综合网在线视频| 欧美精品一区二区三区一线天视频| 在线精品视频小说1| 高潮精品一区videoshd| 日韩不卡一区二区| 亚洲综合色区另类av|