GMMB_WEIGHTPRIOR Multiply PDF values with constant priors P = GMMB_WEIGHTPRIOR(pdfmat, bayesS) pdfmat = N x K matrix of PDF values at N points in K different PDFs (the output of gmmb_pdf) bayesS = the bayesS struct used to compute pdfmat, used fields: apriories P = N x K matrix of weighted PDF values. See also GMMB_PDF. Author(s): Pekka Paalanen <pekka.paalanen@lut.fi> Copyright: Bayesian Classifier with Gaussian Mixture Model Pdf functionality is Copyright (C) 2003, 2004 by Pekka Paalanen and Joni-Kristian Kamarainen. $Name: $ $Revision: 1.1 $ $Date: 2004/11/02 08:32:22 $
0001 %GMMB_WEIGHTPRIOR Multiply PDF values with constant priors 0002 % 0003 % P = GMMB_WEIGHTPRIOR(pdfmat, bayesS) 0004 % 0005 % pdfmat = N x K matrix of PDF values at N points 0006 % in K different PDFs (the output of gmmb_pdf) 0007 % bayesS = the bayesS struct used to compute pdfmat, 0008 % used fields: apriories 0009 % P = N x K matrix of weighted PDF values. 0010 % 0011 % See also GMMB_PDF. 0012 % 0013 % 0014 % Author(s): 0015 % Pekka Paalanen <pekka.paalanen@lut.fi> 0016 % 0017 % Copyright: 0018 % 0019 % Bayesian Classifier with Gaussian Mixture Model Pdf 0020 % functionality is Copyright (C) 2003, 2004 by Pekka Paalanen and 0021 % Joni-Kristian Kamarainen. 0022 % 0023 % $Name: $ $Revision: 1.1 $ $Date: 2004/11/02 08:32:22 $ 0024 % 0025 0026 function p = gmmb_weightprior(pdfmat, bayesS); 0027 0028 N = size(pdfmat, 1); 0029 priors = [bayesS.apriories]; 0030 0031 p = pdfmat .* repmat(priors, N, 1);