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

Unlock this course with a free trial

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

Walkthrough of RecommenderMetrics.py

Walkthrough of RecommenderMetrics.py

- [Narrator] So it's time to start writing some code. We've talked about a lot of different ways to evaluate recommender systems so let's start by writing the code to make those metrics reality. Think of it as test-driven development. We're going to write our tests before we write any actual recommender systems and that's generally a good idea so that you focus on the results you want to achieve. We're going to use an open-source Python library called Surprise to make life easier. You should've already installed that back in the first lecture. Let's take a look at how it works. Let's start by looking at supriselib's documentation online. Surprise is built around measuring the accuracy of recommender systems and although I've said repeatedly that this is the wrong thing to focus on, it's really the best we can do without access to a real, large-scale website of our own. And it can give us some information about the properties of the algorithms that we're going to work with. It also…

Contents