% 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
上傳用戶:我們的船長
//初始化
initscr()
//獲得屏幕尺寸
getmaxyx(stdscr, h, w)
//畫背景
for(i=0 i<h i++)
for(j=0 j<w j++){
mvaddch(i, j, ACS_CKBOARD)
}
refresh()
//建立窗口
pad = newpad(80, 128)
for(i=0 i<80 i++){
char line[128]
sprintf(line, "This line in pad is numbered d\n", i)
mvwprintw(pad, i, 0, line)
}
//刷新屏幕
refresh()
prefresh(pad, 0, 1, 5, 10, 20, 45)
for(i=0 i<50 i++){
prefresh(pad, i+1, 1, 5, 10, 20, 45)
usleep(30000)
}
//等待按鍵
getch()
標簽:
getmaxyx
initscr
stdscr
for
上傳時間:
2014-08-30
上傳用戶:龍飛艇