annotate toolboxes/FullBNT-1.0.7/bnt/inference/static/@belprop_mrf2_inf_engine/find_mpe.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 mpe = find_mpe(engine, local_evidence)
wolffd@0 2 % FIND_MPE Find the most probable explanation of the data
wolffd@0 3 % function mpe = find_mpe(engine, local_evidence
wolffd@0 4 %
wolffd@0 5 % local_evidence{i}(j) = Pr(observation at node i | S(i)=j)
wolffd@0 6 %
wolffd@0 7 % This finds the marginally most likely value for each hidden node.
wolffd@0 8 % It may give inconsistent results if there are ties.
wolffd@0 9
wolffd@0 10 [mpe, niter] = bp_mpe_mrf2(engine.mrf2.adj_mat, engine.mrf2.pot, local_evidence, ...
wolffd@0 11 'max_iter', engine.max_iter, 'momentum', engine.momentum, ...
wolffd@0 12 'tol', engine.tol);