Author: dlyubimov
Date: Wed Sep 21 18:54:38 2011
New Revision: 1173793
URL: http://svn.apache.org/viewvc?rev=1173793&view=rev
Log:
Fixing MAHOUT-816
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/SSVDSolver.java
mahout/trunk/core/src/test/java/org/apache/mahout/math/hadoop/stochasticsvd/LocalSSVDSolverDenseTest.java
Modified:
mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/SSVDSolver.java
URL:
http://svn.apache.org/viewvc/mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/SSVDSolver.java?rev=1173793&r1=1173792&r2=1173793&view=diff
==============================================================================
---
mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/SSVDSolver.java
(original)
+++
mahout/trunk/core/src/main/java/org/apache/mahout/math/hadoop/stochasticsvd/SSVDSolver.java
Wed Sep 21 18:54:38 2011
@@ -306,7 +306,7 @@ public class SSVDSolver {
q <= 0);
// power iterations
- for (int i = 0; i < q; q--) {
+ for (int i = 0; i < q; i++) {
qPath = new Path(outputPath, String.format("ABt-job-%d", i + 1));
ABtJob.run(conf,
Modified:
mahout/trunk/core/src/test/java/org/apache/mahout/math/hadoop/stochasticsvd/LocalSSVDSolverDenseTest.java
URL:
http://svn.apache.org/viewvc/mahout/trunk/core/src/test/java/org/apache/mahout/math/hadoop/stochasticsvd/LocalSSVDSolverDenseTest.java?rev=1173793&r1=1173792&r2=1173793&view=diff
==============================================================================
---
mahout/trunk/core/src/test/java/org/apache/mahout/math/hadoop/stochasticsvd/LocalSSVDSolverDenseTest.java
(original)
+++
mahout/trunk/core/src/test/java/org/apache/mahout/math/hadoop/stochasticsvd/LocalSSVDSolverDenseTest.java
Wed Sep 21 18:54:38 2011
@@ -58,7 +58,12 @@ public class LocalSSVDSolverDenseTest ex
public void testSSVDSolverPowerIterations1() throws IOException {
runSSVDSolver(1);
}
-
+
+ @Test
+ public void testSSVDSolverPowerIterations2() throws IOException {
+ runSSVDSolver(2);
+ }
+
public void runSSVDSolver(int q) throws IOException {
Configuration conf = new Configuration();