% 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
%
標簽:
multidimensional
estimation
algorithm
Gaussian
上傳時間:
2013-12-03
上傳用戶:我們的船長
#include<stdio.h>
void main(void)
{int n,k,derivata,a[10],i
printf("n=") scanf(" d",&n)
for(i=0 i<=n i++)
{ printf("a[ d]=",i) scanf(" d",&a[i])
}
printf("k=") scanf(" d",&k)
for(derivata=1 derivata<=k derivata++)
{
for(i=0 i<=n i++)
a[i]=a[i]*(n-i)
n--
for(i=0 i<=n i++)
printf(" d ",a[i])
printf("\n")
}}
標簽:
void
derivata
include
printf
上傳時間:
2017-09-17
上傳用戶:duoshen1989