O'Reilly logo

Building a Recommendation Engine with Scala by Saleem Ansari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Content-based recommendation steps

We follow these steps to arrive at a mode to make content-based recommendations:

  1. Compute vectors to describe items.
  2. Building profiles of user preferences.
  3. Predicting user interest in items.

First we take our items dataset and identify the features we want to encode for each item. Next we generate a pretend item for a user, based on a user's interaction with items. We can use a user's activity with items such as clicks, likes, purchases, and reviews. So essentially each user now encoded has the same features, and is represented the same as other items in the dataset. Therefore we have a set of feature vectors for all items, and also a pretend feature vector for the target user:

User -> Likes -> Item profile

Now the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required