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

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

?? demgmm4.m

?? this is also good for learning SVM algorithm
?? M
字號:
%DEMGMM4 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) Ian T Nabney (1996-2001)% 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一区二区三区免费野_久草精品视频
欧美日韩中文国产| 国产精品嫩草影院com| 久久综合成人精品亚洲另类欧美 | 午夜婷婷国产麻豆精品| 狠狠网亚洲精品| 欧美视频第二页| 亚洲婷婷综合久久一本伊一区| 免费成人美女在线观看| 在线观看区一区二| 国产精品美女久久久久久久| 毛片av中文字幕一区二区| 欧美性色黄大片| 亚洲精选视频免费看| 盗摄精品av一区二区三区| 欧美成人欧美edvon| 视频一区在线播放| 欧美三级日本三级少妇99| 亚洲黄网站在线观看| 丁香桃色午夜亚洲一区二区三区| 日韩一区二区在线看片| 水野朝阳av一区二区三区| 一本一本大道香蕉久在线精品| 国产色综合一区| 久久97超碰色| 日韩一级片网址| 蜜桃视频一区二区三区| 91精品免费观看| 日韩不卡一区二区三区 | 成人高清伦理免费影院在线观看| 精品国产99国产精品| 另类的小说在线视频另类成人小视频在线| 一本久久综合亚洲鲁鲁五月天| 国产嫩草影院久久久久| 处破女av一区二区| 中文在线资源观看网站视频免费不卡| 国产一区二区精品久久91| 精品欧美乱码久久久久久1区2区| 免费成人在线视频观看| 日韩欧美一二三四区| 看片网站欧美日韩| 日韩精品一区二区三区四区| 精品一区二区三区视频在线观看| 日韩欧美国产三级电影视频| 精品一区二区免费| 欧美韩国日本不卡| 成人av午夜影院| 亚洲激情网站免费观看| 欧美三电影在线| 日韩二区三区在线观看| 久久中文娱乐网| 成人看片黄a免费看在线| 亚洲欧美偷拍三级| 欧美老肥妇做.爰bbww| 麻豆精品视频在线观看| 久久综合九色综合97_久久久| eeuss鲁片一区二区三区| 一区二区三区中文在线观看| 欧美高清www午色夜在线视频| 精品午夜一区二区三区在线观看| 国产婷婷色一区二区三区| 不卡视频在线观看| 亚洲成精国产精品女| 久久综合九色欧美综合狠狠 | 国产欧美日韩精品在线| 色综合久久久久综合体桃花网| 三级成人在线视频| 国产无遮挡一区二区三区毛片日本 | 成人黄色av电影| 无吗不卡中文字幕| 久久久一区二区三区| 日本韩国一区二区三区视频| 秋霞国产午夜精品免费视频| 中文字幕一区二区视频| 欧美一区二区美女| av电影在线观看一区| 日韩中文字幕不卡| 中文字幕亚洲综合久久菠萝蜜| 91精品国产欧美日韩| 不卡视频一二三| 麻豆精品一区二区综合av| 天天综合天天做天天综合| 欧美精品一区二区不卡| 欧美色图在线观看| 成人精品免费看| 奇米777欧美一区二区| 日韩一区在线看| 久久午夜老司机| 欧美一区二区三区视频免费| 91色.com| 成人视屏免费看| 国内精品嫩模私拍在线| 五月天丁香久久| 一区二区三区欧美亚洲| 国产精品久久久久久久久晋中 | 亚洲欧美偷拍三级| 国产日韩欧美电影| 日韩一区二区三区电影在线观看 | 亚洲欧美激情一区二区| 国产女人水真多18毛片18精品视频 | 国内精品免费**视频| 视频一区二区三区在线| 中文字幕不卡三区| 亚洲国产综合在线| 亚洲乱码日产精品bd| 国产精品嫩草99a| 久久久久88色偷偷免费| 精品国产免费人成电影在线观看四季 | 亚洲欧洲性图库| 久久久不卡影院| 久久久五月婷婷| 精品1区2区在线观看| 日韩欧美的一区| 欧美一区二区在线不卡| 欧美一级淫片007| 91精品国产综合久久精品图片| 欧美日韩国产123区| 欧美日韩在线三区| 欧美三级在线视频| 精品视频免费在线| 欧美日韩夫妻久久| 日韩一区二区在线看| 日韩欧美电影一二三| 337p日本欧洲亚洲大胆精品| 精品国产伦一区二区三区观看体验 | 亚洲一区二区三区四区五区黄| 亚洲午夜激情网页| 午夜不卡av在线| 日本不卡视频在线观看| 男女男精品视频| 激情综合一区二区三区| 春色校园综合激情亚洲| 色综合久久久久网| 欧美日韩精品三区| 日韩女优制服丝袜电影| 欧美精品一区二区在线播放 | 日韩欧美亚洲国产另类| 久久久久久久久97黄色工厂| 亚洲欧洲一区二区三区| 亚洲第一会所有码转帖| 免费视频一区二区| 丁香另类激情小说| 欧美影院一区二区| 欧美成人video| 中文字幕不卡在线播放| 亚洲一区二区四区蜜桃| 韩日av一区二区| 97精品电影院| 欧美一卡在线观看| 日本一区二区不卡视频| 亚洲午夜羞羞片| 国产一区二区精品在线观看| 色妹子一区二区| 欧美一区二区三区啪啪| 国产日产欧产精品推荐色| 一区二区高清在线| 国产一区二区三区日韩 | 五月天激情综合| 国产成人亚洲综合a∨婷婷| 欧美午夜影院一区| 久久网这里都是精品| 亚洲国产精品一区二区久久| 国产乱子伦视频一区二区三区 | 色激情天天射综合网| 欧美成人一区二区三区在线观看| 国产精品久久久久久妇女6080| 日韩激情一区二区| 色婷婷香蕉在线一区二区| 欧美成人一区二区三区片免费| 亚洲日本成人在线观看| 国产美女视频91| 欧美日韩国产一区| 亚洲欧美在线另类| 国产成人精品亚洲午夜麻豆| 7878成人国产在线观看| 亚洲欧美日韩系列| 国产成人aaaa| 精品国产百合女同互慰| 午夜影院在线观看欧美| 色婷婷久久久亚洲一区二区三区| 久久精品一区二区三区不卡牛牛| 日韩精品1区2区3区| 精品视频一区 二区 三区| 国产精品初高中害羞小美女文| 国产麻豆精品在线| 欧美一区二区三区人| 午夜视频一区二区三区| 色综合久久综合中文综合网| 国产精品久线在线观看| 国产黑丝在线一区二区三区| 欧美一级片免费看| 日韩精品亚洲专区| 欧美日韩情趣电影| 亚洲午夜精品网| 欧美三级欧美一级| 亚洲最新在线观看| 欧美在线制服丝袜| 亚洲精品v日韩精品| 欧美午夜电影在线播放| 亚洲大型综合色站| 91精品国产欧美一区二区18|