0
votes

I am using Apache Mahout Item Based Recommender with item-item similarity on a data-set of 400 items and 5M users.I am using TanimotoCoefficientSimilarity and GenricItemBasedRecommender.

But when i call the function recommender.recommend, for every user it takes around 1500 milliseconds to generate a recommendation of 5 items. I have also tried caching in both similarity and and recommendation, but nothing helps. Is there a performance issue with apache mahout 0.8, that it takes so long to generate a recommendation?

Please suggest ways to optimize.

Thanks.

1

1 Answers

0
votes

You could try using CandidateItemsStrategy, and MostSimilarItemsCandidateItemsStrategy. E.g.:

CandidateItemsStrategy candidateStrategy = new SamplingCandidateItemsStrategy(...);
MostSimilarItemsCandidateItemsStrategy mostSimilarStrategy = new SamplingCandidateItemsStrategy(...);

Recommender recommender = new GenericItemRecommender(model, similarity, candidateStrategy, mostSimilarStrategy);

You can try playing around the with the parameters for sampling candidate items. These are similar to using neighboring users in UserBasedSimilarity.

If its still slow, you should consider precomputing all similarities between the items periodically and used them in main memory. You could even try a database calls for the precomputed similarities if you don't have enough main memory.