Exercise

The recommender function

In this exercise, we will build a recommender function get_recommendations(), as discussed in the lesson and the previous exercise. As we know, it takes in a title, a cosine similarity matrix, and a movie title and index mapping as arguments and outputs a list of 10 titles most similar to the original title (excluding the title itself).

You have been given a dataset metadata that consists of the movie titles and overviews. The head of this dataset has been printed to console.

Instructions

100 XP
  • Get index of the movie that matches the title by using the title key of indices.
  • Extract the ten most similar movies from sim_scores and store it back in sim_scores.