Item-based recommenders recommend similar items to users by considering the similarity between items instead of the similarity of users, as shown in the previous section.
The following is the given java program to build item-based collaborative filtering. We have used
LogLikelihoodSimilarity to calculate
ItemSimilarity, and then we used the
GenericItemBasedRecommender class to recommend items to users. In addition, we can see how to check similar items for a given item using the
mostSimilarItems method present in
package com.packpub.mahout.recommendationengines; import java.io.File; import java.io.IOException; import java.util.List; import org.apache.mahout.cf.taste.common.TasteException; ...