package org.grouplens.reflens.svd;

import java.util.Collection;

import org.grouplens.reflens.Recommender;
import org.grouplens.reflens.bench.BenchmarkRecommenderFactory;
import org.grouplens.reflens.data.RatingVector;
import org.grouplens.reflens.data.integer.IntDataFactory;

public class FunkSVDFactory implements BenchmarkRecommenderFactory {

	@Override
	public Recommender<Integer, Integer> buildRecommender(
			Collection<RatingVector<Integer, Integer>> ratings) {
		String numFeatures = System.getProperty("org.grouplens.reflens.svd.rank", "50");
		int nf = Integer.parseInt(numFeatures);
		return new FunkSVD<Integer,Integer>(new IntDataFactory(), ratings, nf, 0.001f);
	}

}

@@ -555,45 +555,98 @@
 ;%0A%09%09
-int nf = Integer.parseInt(numFeatures
+String learningRate = System.getProperty(%22org.grouplens.reflens.svd.learningRate%22, %220.001%22
 );%0A%09
@@ -716,19 +716,78 @@
 ngs,
- nf, 0.001f
+%0A%09%09%09%09Integer.parseInt(numFeatures),%0A%09%09%09%09Float.parseFloat(learningRate)
 );%0A%09

Load FunkSVD learning rate from a property.