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

📄 mln.m

📁 四种SVM工具箱的分类与回归算法别人的
💻 M
字号:
function [logL] = mln(X,MI,SIGMA,Pk)% MLN logarithm of value of the likelihood function.% [logL] = mln(X,MI,SIGMA,Pk)%% MLN computes logarithm of value of the likelihood%  function which is defined as product of probabilities p(x) of%  all vectors from the point set X. It is considered that%  conditional p.d. functions p(x|k) are normaly distributed %  and their parameters are given. Futher, it is considered that %  apriori probabilities p(k) are known, then the logarithm holds %                N       K%        logL = sum log sum p(x_i|k) p(k)%               i=1     k=1%% % Input:%  X [DxN] contains N vectors which are D-dimensional.%  MI [DxK] contains K vectors of mean values, MI=[mi_1,mi_2,...mi_K].%  SIGMA [(DxD)xK] contains K covariance matrices which are D-by-D%     dimensional, SIGMA=[sigma_1,sigma_2,...,sigma_K].%     The pair mi_1,sigma_1 describes the first normaly distributed %     p.d. function p(x|k=1) and so one for k=1,2,...K. %  Pk [1xK] contains K values of apriori probabilities.%  % Output:%  logL [1x1] logarithm of value of the Maximal-Likelihood function.%  % See also UNSUNI, UNSUND, UNSUPER.%% Statistical Pattern Recognition Toolbox, Vojtech Franc, Vaclav Hlavac% (c) Czech Technical University Prague, http://cmp.felk.cvut.cz% Written Vojtech Franc (diploma thesis) 4.8.2000% Modifications D=size(MI,1);   % dimensionK=size(MI,2);   % % of classesN=size(X,2);    % # of pointsA=zeros(N,K);for k=1:K,    pxk=normald(X,MI(:,k),SIGMA(:,1+(k-1)*D:k*D));    A(:,k)=pxk(:)*Pk(k);endlogL=sum(log(sum(A,2)));

⌨️ 快捷键说明

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