From 9801ac3df2cbf2656b8d21b2fb0046bfb4046e98 Mon Sep 17 00:00:00 2001 From: "trevor.cohn" Date: Fri, 9 Jul 2010 22:29:02 +0000 Subject: Added initial VB implementation for symetric Dirichlet prior. git-svn-id: https://ws10smt.googlecode.com/svn/trunk@215 ec762483-ff6d-05da-a07a-a48fb63a330f --- gi/posterior-regularisation/prjava/src/phrase/PhraseObjective.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'gi/posterior-regularisation/prjava/src/phrase/PhraseObjective.java') diff --git a/gi/posterior-regularisation/prjava/src/phrase/PhraseObjective.java b/gi/posterior-regularisation/prjava/src/phrase/PhraseObjective.java index f24b903d..cc12546d 100644 --- a/gi/posterior-regularisation/prjava/src/phrase/PhraseObjective.java +++ b/gi/posterior-regularisation/prjava/src/phrase/PhraseObjective.java @@ -1,7 +1,5 @@ package phrase; -import java.io.PrintStream; -import java.util.Arrays; import java.util.List; import optimization.gradientBasedMethods.ProjectedGradientDescent; @@ -163,9 +161,7 @@ public class PhraseObjective extends ProjectedObjective public double [][]posterior(){ return q; } - - public int iterations = 0; - + public boolean optimizeWithProjectedGradientDescent(){ LineSearchMethod ls = new ArmijoLineSearchMinimizationAlongProjectionArc @@ -184,7 +180,6 @@ public class PhraseObjective extends ProjectedObjective optimizer.setMaxIterations(ITERATIONS); updateFunction(); boolean success = optimizer.optimize(this,stats,compositeStop); - iterations += optimizer.getCurrentIteration(); // System.out.println("Ended optimzation Projected Gradient Descent\n" + stats.prettyPrint(1)); //if(succed){ //System.out.println("Ended optimization in " + optimizer.getCurrentIteration()); -- cgit v1.2.3