IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
irsoftmax.m
Go to the documentation of this file.
1 %>@ingroup maths
2 %> @file
3 %> @brief "Softmax" Transformation
4 %>
5 %> Returns a matrix where each row sums to one and the elements are exponentially proportional to their respective originals
6 %>
7 %> <h3>Reference</h3>
8 %> Kuncheva, Combining Pattern Classifiers, 2004, section 5.1, page 152
9 %>
10 %> @sa clssr_ls
11 function Y = irsoftmax(X)
12 
13 Xe = exp(X);
14 Y = Xe./(realmin+repmat(sum(Xe, 2), 1, size(Xe, 2)));
15 
function irsoftmax(in X)
Least-squares classifier.
Definition: clssr_ls.m:5