⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dd_aic.m

📁 模式识别工具箱,希望对大家有用!
💻 M
字号:
function e = dd_aic(w,x)%DD_AIC compute the Akaike Information Criterion for MoG%% e = dd_aic(w,x)%% Compute the Akaike Information Criterion of the Mixture of% Gaussians. We assume we have a trained classifier w and data x.%% also see dd_error, dd_roc, dd_auc% Copyright: D. Tax, R.P.W. Duin, davidt@ph.tn.tudelft.nl% Faculty of Applied Physics, Delft University of Technology% P.O. Box 5046, 2600 GA Delft, The Netherlands[W,labl,map,d] = mapping(w)if ~strcmp(map,'mog_dd')endp = w*x; p = +p(:,1);switch map  case 'gauss_dd'    nrparam = d + d*(d+1)/2;  %mean and cov.matrix      case 'parzen_dd'    nrparam = 1;   %width parameter      case 'mog_dd'    c = size(W{1},1);    [n,d] = size(x);    % the number of parameters    % for all covariance versions, the priors and the means are the same:    nrparam = c + c*d;    switch ctype      case 'sphr'        nrparam = nrparam + c;      case 'diag'        nrparam = nrparam + c*d;      case 'full'        nrparam = nrparam + c*d*(d+1)/2;      otherwise        error('Type of covariance matrix not recognized')    end  otherwise    error('AIC cannot be computed for this mapping!');end% For the loglikelihood:e = -2*sum(log()) + 2*nrparam;%strangely this one does not seem to work!:%e = -2*sum(log(sum(p,2))) + 2*nrparam/n;return

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -