mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tdunn...@apache.org
Subject svn commit: r995170 - /mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/AbstractOnlineLogisticRegression.java
Date Wed, 08 Sep 2010 18:02:15 GMT
Author: tdunning
Date: Wed Sep  8 18:02:15 2010
New Revision: 995170

URL: http://svn.apache.org/viewvc?rev=995170&view=rev
Log:
MAHOUT-497 - Speedups by avoiding allocation in Matrix.get/set

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

Modified: mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/AbstractOnlineLogisticRegression.java
URL: http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/AbstractOnlineLogisticRegression.java?rev=995170&r1=995169&r2=995170&view=diff
==============================================================================
--- mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/AbstractOnlineLogisticRegression.java
(original)
+++ mahout/trunk/core/src/main/java/org/apache/mahout/classifier/sgd/AbstractOnlineLogisticRegression.java
Wed Sep  8 18:02:15 2010
@@ -153,8 +153,8 @@ public abstract class AbstractOnlineLogi
         Vector.Element updateLocation = nonZeros.next();
         int j = updateLocation.index();
 
-        double newValue = beta.get(i, j) + learningRate * gradientBase * instance.get(j)
* perTermLearningRate(j);
-        beta.set(i, j, newValue);
+        double newValue = beta.getQuick(i, j) + learningRate * gradientBase * instance.get(j)
* perTermLearningRate(j);
+        beta.setQuick(i, j, newValue);
       }
     }
 



Mime
View raw message