Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Apache Mahout Essentials

You're reading from   Apache Mahout Essentials Implement top-notch machine learning algorithms for classification, clustering, and recommendations with Apache Mahout

Arrow left icon
Product type Paperback
Published in Jun 2015
Publisher
ISBN-13 9781783554997
Length 164 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Jayani Withanawasam Jayani Withanawasam
Author Profile Icon Jayani Withanawasam
Jayani Withanawasam
Arrow right icon
View More author details
Toc

Item-based recommenders


An item-based recommender measures the similarities between different items and picks the top k closest (in similarity) items to a given item in order to arrive at a rating prediction or recommendation for a given user for a given item.

For the movie recommendation scenario, an item-based recommender works as given in the following figure:

Let's say both Sunil and Roshan like the movies Interstellar (2014) and Star Wars (1977). Then, we can infer that Interstellar (2014) and Star Wars (1977) could be similar items. So, when Nimal likes Interstellar (2014), we recommend Star Wars (1977) to Nimal based on our previous observation.

The following is the Java code example for item-based recommenders:

DataModel model = new FileDataModel (new File("movie.csv"));

ItemSimilarity itemSimilarity = new EuclideanDistanceSimilarity (model);

Recommender itemRecommender = new GenericItemBasedRecommender(model,itemSimilarity);

List<RecommendedItem> itemRecommendations = itemRecommender...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime