From d1ec002b2e7146620b7f6b52b80abf06d80f60cf Mon Sep 17 00:00:00 2001 From: Chris Newell Date: Sun, 4 Mar 2012 13:25:16 +0000 Subject: [PATCH] Added newly specified "FoldIn" interface --- .../itemrec/IFoldInItemRecommender.java | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/org/mymedialite/itemrec/IFoldInItemRecommender.java diff --git a/src/org/mymedialite/itemrec/IFoldInItemRecommender.java b/src/org/mymedialite/itemrec/IFoldInItemRecommender.java new file mode 100644 index 0000000..3663f50 --- /dev/null +++ b/src/org/mymedialite/itemrec/IFoldInItemRecommender.java @@ -0,0 +1,47 @@ +//Copyright (C) 2012 Zeno Gantner +// +//This file is part of MyMediaLite. +// +//MyMediaLite is free software: you can redistribute it and/or modify +//it under the terms of the GNU General Public License as published by +//the Free Software Foundation, either version 3 of the License, or +//(at your option) any later version. +// +//MyMediaLite is distributed in the hope that it will be useful, +//but WITHOUT ANY WARRANTY; without even the implied warranty of +//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//GNU General Public License for more details. +// +//You should have received a copy of the GNU General Public License +//along with MyMediaLite. If not, see . +// + +package org.mymedialite.itemrec; + +import java.util.List; +import org.mymedialite.IRecommender; +import org.mymedialite.data.WeightedItem; + +/** + * Rating predictor that allows folding in new users. + * + * The process of folding in is computing a predictive model for a new user based on their ratings + * and the existing recommender, without modifying the parameters of the existing recommender. + * + * Literature: + * Badrul Sarwar and George Karypis, Joseph Konstan, John Riedl: + * Incremental singular value decomposition algorithms for highly scalable recommender systems. + * Fifth International Conference on Computer and Information Science, 2002. + * http://grouplens.org/papers/pdf/sarwar_SVD.pdf + */ +public interface IFoldInItemRecommender extends IRecommender { + + /** + * Score a list of items given a list of items that represent a new user. + * @return a list of WeightedItems, representing item IDs and predicted scores + * @param accessed_items the ratings (item IDs and rating values) representing the new user + * @param candidate_items the items to be rated + */ + List scoreItems(List accessed_items, List candidate_items); + +} \ No newline at end of file