Jean-Francois Leveque

Correction configuration FunkSVD

......@@ -5,9 +5,14 @@ import org.grouplens.lenskit.ItemRecommender;
import org.grouplens.lenskit.ItemScorer;
import org.grouplens.lenskit.RecommenderBuildException;
import org.grouplens.lenskit.baseline.BaselineScorer;
import org.grouplens.lenskit.baseline.ItemMeanRatingItemScorer;
import org.grouplens.lenskit.baseline.UserMeanBaseline;
import org.grouplens.lenskit.baseline.UserMeanItemScorer;
import org.grouplens.lenskit.core.LenskitConfiguration;
import org.grouplens.lenskit.core.LenskitRecommender;
import org.grouplens.lenskit.data.dao.EventDAO;
import org.grouplens.lenskit.data.dao.PrefetchingUserEventDAO;
import org.grouplens.lenskit.data.dao.UserEventDAO;
import org.grouplens.lenskit.data.history.RatingVectorUserHistorySummarizer;
import org.grouplens.lenskit.data.history.UserHistorySummarizer;
import org.grouplens.lenskit.data.pref.PreferenceDomain;
......@@ -38,7 +43,8 @@ public class FunkSVDRecommender implements Recommender {
config.bind(ItemScorer.class).to(FunkSVDItemScorer.class);
config.bind(GlobalItemScorer.class).to(ItemItemGlobalScorer.class);
config.bind(BaselineScorer.class, ItemScorer.class).to(FunkSVDItemScorer.class);
config.bind(BaselineScorer.class, ItemScorer.class).to(UserMeanItemScorer.class);
config.bind(UserMeanBaseline.class, ItemScorer.class).to(ItemMeanRatingItemScorer.class);
config.bind(PreferenceDomain.class).to(new PreferenceDomain(1.0, 5.0, 1.0));
config.bind(UserHistorySummarizer.class).to(RatingVectorUserHistorySummarizer.class);
......@@ -47,8 +53,11 @@ public class FunkSVDRecommender implements Recommender {
delimitedColumnEventFormat.setHeaderLines(1);
delimitedColumnEventFormat.setFields(Fields.item(), Fields.user(), Fields.rating());
TextEventDAO textEventDAO = new TextEventDAO(new File(filePath), delimitedColumnEventFormat);
config.bind(EventDAO.class).to(textEventDAO);
EventDAO eventDAO = new TextEventDAO(new File(filePath), delimitedColumnEventFormat);
config.bind(EventDAO.class).to(eventDAO);
UserEventDAO userEventDAO = new PrefetchingUserEventDAO(eventDAO);
config.bind(UserEventDAO.class).to(userEventDAO);
LenskitRecommender rec;
......