Riya's Medley #13: How Recommendation Engine Works
Online recommendations rely on collaborative and content-based methods to personalize our digital choices. Content-based relies on item characteristics, while collaborative uses shared preferences.
A recommendation system is a tool that uses machine learning alogorithms to suggest things you might like. It works by studying how people behave and find clues in the data they leave behind, whether they tell it directly or not.
There are mainly two recommendation engines: content-based filtering, collaborative filtering. There is another one which is called Hybrid model which uses both of these.
Content Based Filtering
Content-based filtering recommends things that are similar to what you've shown interest in before, based on your past actions or feedback. For example, if you liked science fiction movies in the past, it will suggest more of those movies to you.
Finding these similar movies is done through some algorithms like-
Cosine Similarity
Imagine we're trying to figure out if a movie is a good match for you based on your preferred genre. We create a list of based on genre of movies you liked and assign positive numbers to them. For genre you didn’t like, we use negative numbers. We also keep a list of all the movies in our system.
Picture your list and the movie's list as lines in space. The "cosine distance" is like measuring the angle between these lines. If the angle is very small (close to 0), it means the movie has similar genre you like, and you might enjoy it. If the angle is big, you probably won't like the movie, so we don't recommend it.
Classification Method
Imagine we're using a decision tree to decide if you'd like a movie. At each level of the tree, we ask a question based on your preferences. For example, the first question could be, "Do you like sci-fi movies?" If you say "yes," we move one way, and if you say "no," we go another way. We keep asking questions until we reach a decision: recommend or don't recommend.
Collaborative Based Filtering
Collaborative-Based Filtering is like asking for movie recommendations from a group of friends who share your movie tastes. It's a way to find new movies to watch based on what people similar to you have enjoyed.
One of the algorithm used to implement collaborative-based factorization is Matrix Factorization. This is a very mathematical heavy algorithm. It can break down a table into features to find pattern.
To undertsand matrix factorization you may find this article helpful-
Matrix Factorization: A Simple Tutorial and Implementation in Python
Interesting articles around the Web
Thanks for reading. If you liked this article, please share with your friends.
Wow very informative!