Description: % EM algorithm for k multidimensional Gaussian mixture estimation
%
% Inputs:
% X(n,d) - input data, n=number of observations, d=dimension of variable
% k - maximum number of Gaussian components allowed
% ltol - percentage of the log likelihood difference between 2 iterations ([] for none)
% maxiter - maximum number of iteration allowed ([] for none)
% pflag - 1 for plotting GM for 1D or 2D cases only, 0 otherwise ([] for none)
% Init - structure of initial W, M, V: Init.W, Init.M, Init.V ([] for none)
%
% Ouputs:
% W(1,k) - estimated weights of GM
% M(d,k) - estimated mean vectors of GM
% V(d,d,k) - estimated covariance matrices of GM
% L - log likelihood of estimates
% Platform: |
Size: 3416 |
Author:Shaoqing Yu |
Hits:
Description: % EM algorithm for k multidimensional Gaussian mixture estimation
%
% Inputs:
% X(n,d) - input data, n=number of observations, d=dimension of variable
% k - maximum number of Gaussian components allowed
% ltol - percentage of the log likelihood difference between 2 iterations ([] for none)
% maxiter - maximum number of iteration allowed ([] for none)
% pflag - 1 for plotting GM for 1D or 2D cases only, 0 otherwise ([] for none)
% Init - structure of initial W, M, V: Init.W, Init.M, Init.V ([] for none)
%
% Ouputs:
% W(1,k) - estimated weights of GM
% M(d,k) - estimated mean vectors of GM
% V(d,d,k) - estimated covariance matrices of GM
% L - log likelihood of estimates
%- EM algorithm for k multidimensional Gaussian mixture estimation Inputs: X (n, d)- input data, n = number of observations, d = dimension of variable k- maximum number of Gaussian components allowed ltol- percentage of the log likelihood difference between 2 iterations ([] for none) maxiter- maximum number of iteration allowed ([] for none) pflag- 1 for plotting GM for 1D or 2D cases only, 0 otherwise ([] for none) Init- structure of initial W, M, V: Init.W, Init.M, Init.V ([] for none) Ouputs: W (1, k)- estimated weights of GM M (d, k)- estimated mean vectors of GM V (d, d, k)- estimated covariance matrices of GM L- log likelihood of estimates Platform: |
Size: 3072 |
Author:Shaoqing Yu |
Hits:
Description: 不错的GM_EM代码。用于聚类分析等方面。- GM_EM- fit a Gaussian mixture model to N points located in n-dimensional
space.
Note: This function requires the Statistical Toolbox and, if you wish to
plot (for k = 2), the function error_ellipse
Elementary usage:
GM_EM(X,k)- fit a GMM to X, where X is N x n and k is the number of
clusters. Algorithm follows steps outlined in Bishop
(2009) Pattern Recognition and Machine Learning , Chapter 9.
Additional inputs:
bn_noise- allow for uniform background noise term ( T or F ,
default T ). If T , relevant classification uses the
(k+1)th cluster
reps- number of repetitions with different initial conditions
(default = 10). Note: only the best fit (in a likelihood sense) is
returned.
max_iters- maximum iteration number for EM algorithm (default = 100)
tol- tolerance value (default = 0.01)
Outputs
idx- classification/labelling of data in X
mu- GM centres Platform: |
Size: 3072 |
Author:朱魏 |
Hits: