GMMB_DECIDE Make decisions; choose index of the max value. labels = GMMB_DECIDE(p_in) p_in = N x K matrix labels = N x 1 matrix of integers The labels will be index of the maximum value on each row, except if the max value is zero, index will also be zero. 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_DECIDE Make decisions; choose index of the max value. 0002 % 0003 % labels = GMMB_DECIDE(p_in) 0004 % 0005 % p_in = N x K matrix 0006 % labels = N x 1 matrix of integers 0007 % 0008 % The labels will be index of the maximum value on each row, 0009 % except if the max value is zero, index will also be zero. 0010 % 0011 % Author(s): 0012 % Pekka Paalanen <pekka.paalanen@lut.fi> 0013 % 0014 % Copyright: 0015 % 0016 % Bayesian Classifier with Gaussian Mixture Model Pdf 0017 % functionality is Copyright (C) 2003, 2004 by Pekka Paalanen and 0018 % Joni-Kristian Kamarainen. 0019 % 0020 % $Name: $ $Revision: 1.1 $ $Date: 2004/11/02 08:32:22 $ 0021 % 0022 0023 function labels = gmmb_decide(p_in); 0024 0025 [vals, labels] = max(p_in, [], 2); 0026 labels(vals==0) = 0;