From c7c274a7d4b0510c5cd7424704197de4aa6acde5 Mon Sep 17 00:00:00 2001 From: "trevor.cohn" Date: Tue, 13 Jul 2010 19:36:52 +0000 Subject: Changed initialisation git-svn-id: https://ws10smt.googlecode.com/svn/trunk@238 ec762483-ff6d-05da-a07a-a48fb63a330f --- gi/posterior-regularisation/prjava/src/phrase/PhraseCluster.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gi/posterior-regularisation/prjava/src/phrase') diff --git a/gi/posterior-regularisation/prjava/src/phrase/PhraseCluster.java b/gi/posterior-regularisation/prjava/src/phrase/PhraseCluster.java index 68148248..1f73764e 100644 --- a/gi/posterior-regularisation/prjava/src/phrase/PhraseCluster.java +++ b/gi/posterior-regularisation/prjava/src/phrase/PhraseCluster.java @@ -42,6 +42,7 @@ public class PhraseCluster { for(double [][]i:emit) for(double []j:i) arr.F.randomise(j, true); + for(double []j:pi) arr.F.randomise(j, true); } @@ -188,6 +189,7 @@ public class PhraseCluster { private double KL_symmetric_dirichlet(double[] q, double alpha) { // assumes that zeros in q are structural & should be skipped + // FIXME: asssumption doesn't hold double p0 = alpha; double q0 = 0; -- cgit v1.2.3