Hi,
I have read this UserBasedRecommenderTest in the source code of taste, and
worked on it. I have some
questions on the algorithm of,
public final class GenericUserBasedRecommenderTest extends TasteTestCase {
public void testHowMany() throws Exception {
DataModel dataModel = getDataModel(
new long[] {1, 2, 3, 4, 5},
new Double[][] {
{0.1, 0.2},
{0.2, 0.3, 0.3, 0.6},
{0.4, 0.4, 0.5, 0.9},
{0.1, 0.4, 0.5, 0.8, 0.9, 1.0},
{0.2, 0.3, 0.6, 0.7, 0.1, 0.2},
});
UserSimilarity similarity = new PearsonCorrelationSimilarity(dataModel);
UserNeighborhood neighborhood = new NearestNUserNeighborhood(2,
similarity, dataModel);
Recommender recommender = new GenericUserBasedRecommender(dataModel,
neighborhood, similarity);
List<RecommendedItem> fewRecommended = recommender.recommend(1, 2);
......
}
}
In the recommend method, i get two recommendation for the user which has 1
as a userID. But how can i know these recommendations related with which
itemIDs? User1 does not have recommendation for item2,3,4 and 5. So how can
I reach a recommend for User1 to specifically Item4 ?
Besides in your example datasets, what if user5 does not have recommendation
for item3(0.7), how can you represent it, as a zero?
I trace the test code but i couldn't find any answer, so thanks for any help
Regards,
Seda
--
View this message in context:
http://n3.nabble.com/GenericUserBasedRecommenderTest-recommend-method-tp682235p682235.html
Sent from the Mahout User List mailing list archive at Nabble.com.