mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tdunn...@apache.org
Subject svn commit: r999751 - /mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/AdaptiveLogisticRegression.java
Date Wed, 22 Sep 2010 04:32:22 GMT
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[]



Mime
View raw message