@@ -0,0 +1,3071 @@
+/*%0A * LensKit, an open source recommender systems toolkit.%0A * Copyright 2010-2013 Regents of the University of Minnesota and contributors%0A * Work on LensKit has been funded by the National Science Foundation under%0A * grants IIS 05-34939, 08-08692, 08-12148, and 10-17697.%0A *%0A * This program is free software; you can redistribute it and/or modify%0A * it under the terms of the GNU Lesser General Public License as%0A * published by the Free Software Foundation; either version 2.1 of the%0A * License, or (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful, but WITHOUT%0A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS%0A * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more%0A * details.%0A *%0A * You should have received a copy of the GNU General Public License along with%0A * this program; if not, write to the Free Software Foundation, Inc., 51%0A * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%0A */%0Apackage org.grouplens.lenskit.mf.funksvd;%0A%0Aimport org.grouplens.lenskit.ItemScorer;%0Aimport org.grouplens.lenskit.baseline.BaselinePredictor;%0Aimport org.grouplens.lenskit.baseline.ItemUserMeanPredictor;%0Aimport org.grouplens.lenskit.baseline.MeanDamping;%0Aimport org.grouplens.lenskit.core.LenskitRecommenderEngineFactory;%0Aimport org.grouplens.lenskit.iterative.IterationCount;%0Aimport org.grouplens.lenskit.knn.NeighborhoodSize;%0Aimport org.grouplens.lenskit.knn.item.ItemItemScorer;%0Aimport org.grouplens.lenskit.knn.item.ItemSimilarity;%0Aimport org.grouplens.lenskit.test.CrossfoldTestSuite;%0Aimport org.grouplens.lenskit.transform.normalize.BaselineSubtractingUserVectorNormalizer;%0Aimport org.grouplens.lenskit.transform.normalize.UserVectorNormalizer;%0Aimport org.grouplens.lenskit.util.table.Table;%0Aimport org.grouplens.lenskit.vectors.similarity.CosineVectorSimilarity;%0Aimport org.grouplens.lenskit.vectors.similarity.SimilarityDamping;%0Aimport org.grouplens.lenskit.vectors.similarity.VectorSimilarity;%0A%0Aimport static org.hamcrest.Matchers.closeTo;%0Aimport static org.junit.Assert.assertThat;%0A%0A/**%0A * Do major tests on the FunkSVD recommender.%0A *%0A * @author %3Ca href=%22http://www.grouplens.org%22%3EGroupLens Research%3C/a%3E%0A */%0Apublic class TestFunkSVDAccuracy extends CrossfoldTestSuite %7B%0A    @SuppressWarnings(%22unchecked%22)%0A    @Override%0A    protected void configureAlgorithm(LenskitRecommenderEngineFactory factory) %7B%0A        factory.bind(ItemScorer.class)%0A               .to(FunkSVDItemScorer.class);%0A        factory.bind(BaselinePredictor.class)%0A               .to(ItemUserMeanPredictor.class);%0A        factory.in(ItemUserMeanPredictor.class)%0A               .set(MeanDamping.class)%0A               .to(10);%0A        factory.set(FeatureCount.class).to(25);%0A        factory.set(IterationCount.class).to(125);%0A    %7D%0A%0A    @Override%0A    protected void checkResults(Table table) %7B%0A        assertThat(table.column(%22MAE%22).average(),%0A                   closeTo(0.74, 0.025));%0A        assertThat(table.column(%22RMSE.ByUser%22).average(),%0A                   closeTo(0.92 , 0.05));%0A    %7D%0A%7D%0A

Add FunkSVD accuracy tests.