comparison toolboxes/RBM/softmax2discrete.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function D = softmax2discrete( S,Vals )
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 % convert softmax to col-array of discrete value %
4 % S: softmax %
5 % Vals: list of possible values %
6 % sontran2012 %
7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8 [dummy out] = max(S');
9 out = out';
10 D = zeros(size(out));
11 for i=1:size(out,1)
12 D(i) = Vals(out(i));
13 end
14 end
15