Skip to content

Instantly share code, notes, and snippets.

View sscdotopen's full-sized avatar

Sebastian Schelter sscdotopen

View GitHub Profile
@sscdotopen
sscdotopen / gist:5416101
Created April 18, 2013 20:48
ALS Testing patch
Index: core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/svd/ALSWRFactorizer.java
===================================================================
--- core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/svd/ALSWRFactorizer.java (Revision 1469532)
+++ core/src/main/java/org/apache/mahout/cf/taste/impl/recommender/svd/ALSWRFactorizer.java (Arbeitskopie)
@@ -173,6 +173,7 @@
}
for (int iteration = 0; iteration < numIterations; iteration++) {
+ long start = System.currentTimeMillis();
log.info("iteration {}", iteration);
\\
\text{transition matrix}: A \\
\text{rank vector}: x \\
\\
\text{PageRank}: x^{t+1} = A x^t \\
\\
\forall t > 2: \\
import org.apache.mahout.math.DenseVector;
import org.apache.mahout.math.Vector;
import org.apache.mahout.math.function.IntObjectProcedure;
import org.apache.mahout.math.map.OpenIntObjectHashMap;
import java.util.Random;
public class Benchmark {
static int NUM_FEATURES = 20;
import org.apache.mahout.math.DenseVector;
import org.apache.mahout.math.Vector;
import org.apache.mahout.math.function.IntObjectProcedure;
import org.apache.mahout.math.map.OpenIntObjectHashMap;
import java.util.Random;
public class Benchmark {
static int NUM_FEATURES = 20;