diff options
Diffstat (limited to 'sourcecodes/bnt-master/BNT/potentials/@cpot/normalize_pot.m')
| -rw-r--r-- | sourcecodes/bnt-master/BNT/potentials/@cpot/normalize_pot.m | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sourcecodes/bnt-master/BNT/potentials/@cpot/normalize_pot.m b/sourcecodes/bnt-master/BNT/potentials/@cpot/normalize_pot.m new file mode 100644 index 00000000..c6f89dc3 --- /dev/null +++ b/sourcecodes/bnt-master/BNT/potentials/@cpot/normalize_pot.m @@ -0,0 +1,10 @@ +function [pot, loglik] = normalize_pot(pot) +% NORMALIZE_POT Convert the canonical potential Pr(X,E) into Pr(X|E) and return log Pr(E). +% [pot, loglik] = normalize_pot(pot) + +mom = cpot_to_mpot(pot); % move the normalizing constant out of g, to reveal the coefficient +%loglik = scaling_factor_pot(mom); +%loglik = mom.logp; +[temp, loglik] = normalize_pot(mom); +pot.g = pot.g - loglik; + |
