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.

Exercise solution: Hybrid recommenders

Exercise solution: Hybrid recommenders

- [Instructor] I hope you were able to implement a hybrid recommender on your own. It's a way to tie together a lot of different things we've learned under one umbrella, which is a fitting way to finish this course. If you'd like to take a look at my solution, open up Spider and control, shift, W, to close out anything you may have open, then open up the contents of the Hybrid folder in the course materials. Start by looking at the HybridAlgorithm.py file. It's rather surprisingly small, which is a testament to the architecture of the recommender library we've built here. It allows us to easily combine different algorithms that might do totally different things, thanks to having a common interface on every recommender. The init function just takes in a list of algorithms that derive from AlgoBase, and an associated list of weights you want to assign to each one when producing final rating estimates. All the fit function does is iterate through each algorithm in our list, training each…

Contents