From the course: Building Recommender Systems with Machine Learning and AI

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Walkthrough of TestMetrics.py

Walkthrough of TestMetrics.py

- [Instructor] So we've made a Python package with lots of useful functions for evaluating recommender systems. Let's see them in action using a real recommender system trained with real movie ratings from the MovieLens Dataset. Again we are using the evaluating folder in our course materials for this section. Let's open up test metrics and MovieLens.ty. Start off in test metrics by importing the modules we need including our MovieLens module. Take a quick look at MovieLens.ty and see what it does and how it works. It's responsible for loading up the raw MovieLens files that contain ratings and information about the movies and converting them into datasets that Surprise can use. It also includes some useful functions for quickly looking up movie titles and other utility functions that we'll use later. Okay so what we're going to do is create a recommender system around the SVD algorithm and evaluate it across the many metrics we've designed. How SVD works isn't important right now…

Contents