annotate 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
rev   line source
wolffd@0 1 function D = softmax2discrete( S,Vals )
wolffd@0 2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
wolffd@0 3 % convert softmax to col-array of discrete value %
wolffd@0 4 % S: softmax %
wolffd@0 5 % Vals: list of possible values %
wolffd@0 6 % sontran2012 %
wolffd@0 7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
wolffd@0 8 [dummy out] = max(S');
wolffd@0 9 out = out';
wolffd@0 10 D = zeros(size(out));
wolffd@0 11 for i=1:size(out,1)
wolffd@0 12 D(i) = Vals(out(i));
wolffd@0 13 end
wolffd@0 14 end
wolffd@0 15