You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mahout.apache.org by td...@apache.org on 2010/09/22 06:32:22 UTC

svn commit: r999751 - /mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/AdaptiveLogisticRegression.java

Author: tdunning
Date: Wed Sep 22 04:32:22 2010
New Revision: 999751

URL: http://svn.apache.org/viewvc?rev=999751&view=rev
Log:
Added window setting

Modified:
    mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/AdaptiveLogisticRegression.java

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/AdaptiveLogisticRegression.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/AdaptiveLogisticRegression.java?rev=999751&r1=999750&r2=999751&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/AdaptiveLogisticRegression.java (original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/AdaptiveLogisticRegression.java Wed Sep 22 04:32:22 2010
@@ -70,6 +70,7 @@ public class AdaptiveLogisticRegression 
   private int poolSize = 20;
   private State<Wrapper> seed;
   private int numFeatures;
+  private double averagingWindow;
 
   // for GSON
   private AdaptiveLogisticRegression() {
@@ -264,6 +265,10 @@ public class AdaptiveLogisticRegression 
     this.numFeatures = numFeatures;
   }
 
+  public void setAveragingWindow(int averagingWindow) {
+    seed.getPayload().getLearner().setWindowSize(averagingWindow);
+  }
+
   /**
    * Provides a shim between the EP optimization stuff and the CrossFoldLearner.  The most important
    * interface has to do with the parameters of the optimization.  These are taken from the double[]