30 Days of Algorithms: From Zero to Intermediate (30/30) — K-Nearest Neighbors
Building a recommendations system
You just subscribed to Netflix and have watched a few movies. You’re curious how they recommend new content.
Netflix uses a system that identifies people with similar viewing habits to you. By analyzing what those users enjoy, Netflix can suggest movies you might also like.
Have you wondered why Netflix asks you to rate this movie? It helps them decide whether to recommend it to you or not.
Now we will take the movies by genre and count how many movies we like in each genre. We will calculate the distance between you and your friends. The smaller the number, the better.
You and friend 1
We will take each number in the groups (5, 4, 3)
and (4, 3, 5)
, find the difference between them, square the differences, and then take the square root of the sum of these squared differences.