This book is licensed for the personal use of the buyer. Please do not share or resell the file. Short quotations with attribution are welcome.
The information in this book is provided for education. It is not legal, financial or other professional advice. Product and company names are used only to describe them and belong to their owners.
This is a free sample: the introduction and first chapter.
IntroductionIntroduction
Recommendations decide much of what people see online: the next video, the products on a shop's front page, the songs in a playlist, the articles in a news feed, the jobs and homes suggested in search. Done well, they help people discover things they value among overwhelming choice. Done badly, they trap people in narrow loops, favour sensational content or simply annoy.
This book explains how recommender systems work and how to build one that serves both users and the business. It starts with baselines that are surprisingly hard to beat, then covers collaborative filtering, matrix factorisation, content-based and embedding methods, and the two-stage architecture used by large systems. It gives special attention to evaluation (offline metrics, online experiments and what both miss) and to the practical and ethical issues: cold start, diversity, feedback loops, fairness and privacy.
Worked examples use tiny datasets you can compute by hand.
How the book is organised
Chapters 1 to 7: what recommenders do, data and feedback, baselines.
Chapters 8 to 16: collaborative filtering, matrix factorisation, content-based and embedding methods, hybrids and sequences.
Chapters 17 to 24: architecture: candidate generation, ranking, features, re-ranking, real-time serving and search.
Chapters 25 to 33: evaluation: offline metrics, online experiments, long-term effects and business metrics.
Chapters 34 to 40: practice: logging, a matrix factorisation step by hand, item-based code, email and notifications, business-to-business settings, language models and governance.
Chapters 41 and 42: approximate nearest-neighbour search and debugging.
Chapters 43 to 54: cold start, exploration, feedback loops, fairness, privacy, explanations, user control, safety, case studies and a checklist.
Chapter 1What Recommenders Do
A recommender ranks items for a user in a context. Variants include:
Personalised feeds: a ranked list for each user.
"Similar items": related products on a product page.