about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/BNT/potentials/@scgcpot/normalize_pot.m
diff options
context:
space:
mode:
Diffstat (limited to 'sourcecodes/bnt-master/BNT/potentials/@scgcpot/normalize_pot.m')
-rw-r--r--sourcecodes/bnt-master/BNT/potentials/@scgcpot/normalize_pot.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/sourcecodes/bnt-master/BNT/potentials/@scgcpot/normalize_pot.m b/sourcecodes/bnt-master/BNT/potentials/@scgcpot/normalize_pot.m
new file mode 100644
index 00000000..8900c66e
--- /dev/null
+++ b/sourcecodes/bnt-master/BNT/potentials/@scgcpot/normalize_pot.m
@@ -0,0 +1,6 @@
+function [pot, loglik] = normalize_pot(pot)
+% NORMALIZE_POT Convert the element of stable conditional gaussian potential Pr(X,E) into Pr(X|E) and return log Pr(E).
+% [pot, loglik] = normalize_pot(pot)
+
+loglik = log(pot.p);
+pot.p = 1;