资源简介
GMM只是一个数学模型,只是对数据形态的拟和,但是和你所看到的数据分布存在出入也是正常的,因为用EM估计GMM的那些参数时,一般假设我们所得到的数据是不完备的(也就是说假设我们看到的数据分布不是真正的分布,它在运算时把那部分丢失或者叫隐藏的数据“补”上了)
代码片段和文件信息
function y = cmvnpdf(X Mu Sigma)
%CMVNPDF - (Complex range) multivariate normal probability density function (pdf).
% Y = CMVNPDF(X) returns the n-by-1 vector Y containing the probability
% density of the multivariate normal distribution with zero mean and
% identity covariance matrix evaluated at each row of the n-by-d matrix
% X. Rows of X correspond to observations and columns correspond to
% variables or coordinates.
%
% Y = CMVNPDF(XMU) returns the density of the multivariate normal
% distribution with mean MU and identity covariance matrix evaluated
% at each row of X. MU is a 1-by-d vector or an n-by-d matrix in which
% case the density is evaluated for each row of X with the corresponding
% row of MU. MU can also be a scalar value which CMVNPDF replicates to
% match the size of X.
%
% Y = CMVNPDF(XMUSIGMA) returns the density of the multivariate normal
% distribution with mean MU and covariance SIGMA evaluated at each row
% of X. SIGMA is a d-by-d matrix or an d-by-d-by-n array in which case
% the density is evaluated for each row of X with the corresponding page
% of SIGMA i.e. CMVNPDF computes Y(I) using X(I:) and SIGMA(::I).
% Pass in the empty matrix for MU to use its default value when you want
% to only specify SIGMA.
%
% If X is a 1-by-d vector CMVNPDF replicates it to match the leading
% dimension of MU or the trailing dimension of SIGMA.
%
% Example:
%
% mu = [1 -1];
% Sigma = [.9 .4; .4 .3];
% X = mvnrnd(mu Sigma 10);
% p = cmvnpdf(X mu Sigma);
%
% See also MVNRND NORMPDF.
% Copyright 1993-2002 The MathWorks Inc.
% Revision: 1.2 Date: 2002/03/28 16:51:27
% Modified by Pekka Paalanen LUT 2003
%
%
% $Name: $
% $Revision: 1.1 $ $Date: 2004/08/16 15:06:44 $
if nargin < 1 | isempty(X)
error(‘Requires the input argument X.‘);
elseif ndims(X) > 2
error(‘X must be a matrix.‘);
end
% Get size of data. Column vectors provisionally interpreted as multiple scalar data.
[nd] = size(X);
% Assume zero mean data are already centered
if nargin < 2 | isempty(Mu)
X0 = X;
% Get scalar mean and use it to center data
elseif prod(size(Mu)) == 1
X0 = X - Mu;
% Get vector mean and use it to center data
elseif ndims(Mu) == 2
[n2d2] = size(Mu);
if d2 ~= d % has to have same number of coords as X
error(‘X and MU must have the same number of columns.‘);
elseif n2 == n % lengths match
X0 = X - Mu;
elseif n2 == 1 % mean is a single row rep it out to match data
X0 = X - repmat(Mun1);
elseif n == 1 % data is a single row rep it out to match mean
n = n2;
X0 = repmat(Xn21) - Mu;
else % sizes don‘t match
error(‘X or MU must be a row vector or X and MU must have the same number of rows.‘);
end
else
error(‘MU must be a matrix.‘);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2008-10-17 16:53 (GMM)matlab源码
文件 6613 2005-04-06 21:25 (GMM)matlab源码\cmvnpdf.m
文件 3208 2005-04-06 21:18 (GMM)matlab源码\covfixer2.m
文件 1104 2005-06-02 16:10 (GMM)matlab源码\estS_generate.m
文件 1099 2005-04-04 11:37 (GMM)matlab源码\getargs.m
文件 1008 2005-04-07 13:58 (GMM)matlab源码\gmmb_cmeans.m
文件 10323 2005-04-07 18:25 (GMM)matlab源码\gmmb_em.m
文件 1132 2005-04-07 12:25 (GMM)matlab源码\gmmb_em_init_cmeans1.m
文件 1221 2005-04-06 21:13 (GMM)matlab源码\gmmb_em_init_fcm1.m
文件 1227 2005-04-04 11:43 (GMM)matlab源码\init_fcm1.m
文件 474 2005-04-06 21:09 (GMM)matlab源码\warning_wrap.m
文件 248 2006-10-17 11:23 (GMM)matlab源码\注意.txt
----------- --------- ---------- ----- ----
27657 12
相关资源
- MATLAB 实现各类常见算法
- 数字信号处理 理论算法与实现 胡广书
- 基于BP神经网络的盲均衡算法 C程序(
- 激光谐振腔课程设计(matlab)exe及源
- Lozi混沌系统相关分析的MATLAB程序
- (7,4)循环码-信道编码的matlab仿真
- 一个用MATLAB编写的用于估计信号谐波
- kalman工具箱 用matlab编写 包附全部函数
- 基于harris算法的角点检测matlab原代码
- 偏最小二乘分析matlab工具包
- 基于matlab的窗函数法FIR数字滤波器设
- 北邮Matlab实验报告和代码
- 图像匹配matlab源程序sift算法
- matlab实现摄像机标定
- matlab编写的量子遗传算法
- 图像降噪Matlab代码
- Alamouti编码2X2仿真(MATLAB)
- 用蚁群算法求解TSP问题的matlab程序
- 跳扩散过程下欧式期权的定价matlab源
- 小波神经网络Matlab交通仿真程序
- 粒子群算法matlab工具箱
- MATLAB音频信号的分析与合成程序
- qam 用matlab实现qam仿真的程序
- curvelet matlab工具箱
- matlab人脸识别和特征提取
- 圣诞树(matlab代码)
- MATLAB六自由度弹道仿真程序
- matlab的pde工具箱使用方法
- 心音信号处理分析(附matlab代码)
- MATLAB实现弹道仿真
评论
共有 条评论