Collaborative filtering

We keep hearing about recommender systems. They’re the things that suggest movies on Netflix, songs on Spotify, or products on Amazon. At the heart of many of them is collaborative filtering. Think of it as “people like you liked this.”

How it works

Collaborative filtering looks at behavior, not content. Instead of analyzing what a movie is “about,” it checks who watched it. If users who share our taste all enjoyed a film, odds are we will too. She (AI) just connects the dots.

User based

One approach is user-based. She finds clusters of people with similar ratings. If five of our “neighbors” loved a sci-fi show, she will quietly put it on our list. Simple rule of thumb: our digital neighbors matter more than strangers.

Item based

The other approach is item-based. Instead of matching us to other users, she compares the items themselves by who liked them. If lots of people who bought headphones also bought a certain adapter, she pairs them. Less about people, more about patterns in stuff.

Why it feels natural

We all already ask friends what they’re watching or reading. Collaborative filtering just scales that instinct. She listens to everyone’s choices at once and serves them back as suggestions. Feels human, even though it’s math.

One last thought

As coders, we don’t need to reinvent her logic. We just need to be sure she can see enough of the data to be useful. Sparse data makes her guesses weird. With enough neighbors, she feels like the friend who always has a good recommendation.