Session Ready
Exercise

Using the recommender transformation

In the last few exercises, you calculated the average rating per course and cleaned up some course data. You will use this data to produce viable recommendations for DataCamp students.

As a reminder, here are the decision rules for producing recommendations:

  • Use technology a student has rated the most.
  • Exclude courses a student has already rated.
  • Find the three top-rated courses from eligible courses.

In order to produce the final recommendations, you will use the average course ratings, and the list of eligible recommendations per user, stored in avg_course_ratings and courses_to_recommend respectively. You will do this by completing the transform_recommendations() function which merges both DataFrames and finds the top 3 highest rated courses to recommend per user.

Instructions
100 XP
  • Complete the transform_recommendations() function by merging both DataFrames and sorting the results by rating.
  • Store recommendations per user in the recommendations object.