Created
April 18, 2013 20:48
-
-
Save sscdotopen/5416101 to your computer and use it in GitHub Desktop.
ALS Testing patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
/* fix M - compute U */ | |
@@ -249,6 +250,7 @@ | |
log.warn("Error when computing item features", e); | |
} | |
} | |
+ System.out.println(System.currentTimeMillis() - start); | |
} | |
log.info("finished computation of the factorization..."); | |
Index: core/src/main/java/org/apache/mahout/cf/taste/hadoop/als/Testing.java | |
=================================================================== | |
--- core/src/main/java/org/apache/mahout/cf/taste/hadoop/als/Testing.java (Revision 0) | |
+++ core/src/main/java/org/apache/mahout/cf/taste/hadoop/als/Testing.java (Revision 0) | |
@@ -0,0 +1,21 @@ | |
+package org.apache.mahout.cf.taste.hadoop.als; | |
+ | |
+import org.apache.mahout.cf.taste.impl.model.file.FileDataModel; | |
+import org.apache.mahout.cf.taste.impl.recommender.svd.ALSWRFactorizer; | |
+ | |
+import java.io.File; | |
+ | |
+public class Testing { | |
+ | |
+ public static void main(String[] args) throws Exception { | |
+ | |
+ FileDataModel dataModel = new FileDataModel(new File("/home/ssc/Entwicklung/datasets/movielens1M/movielens.csv")); | |
+ | |
+ ALSWRFactorizer factorizer = new ALSWRFactorizer(dataModel, 100, 0.065, 8); | |
+ | |
+ factorizer.factorize(); | |
+ | |
+ | |
+ } | |
+ | |
+} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment