DEV Community

Cover image for Recommender Systems for podcasts
Sanfer Noronha
Sanfer Noronha

Posted on • Updated on

Recommender Systems for podcasts

Overview
Recommender systems capture the patterns of people’s behavior and use it to predict what else they might want or like.

Why recommender systems ?

  1. Broader exposure
  2. Possibility of continual usage or purchase of products
  3. Provides better experience

Goals

  1. Build a recommender system/systems for various use cases of a podcast system.
  2. Come up with new ideas to enhance the user experience while interacting with the system.

Types of recommender systems we will look at

  1. Content-based : Tries to figure out what a user’s favourite aspects of an item is, and then recommends items that present those aspects.
  2. Collaborative : Finds similar groups of users, and provides recommendations based on their taste.

Content-based recommender system

First let us consider a scenario where we have 6 podcasts out of which our user has heard three. This is a use case in which we look at the current preferences of a current user and recommend more podcasts to that user. We will cover new users later.
So we have
6 podcasts and 3 have been heard by the user
We can work with the genres of the podcasts and with the reactions(ratings,duration of listening,number of episodes heard, etc) by the user.

We will create an input user ratings vector which will have the ratings(or other metrics mentioned above in numerical form).
Next, we will one-hot encode the user rated podcasts into its respective genres.
For example:

One-hot encoding

Let’s assume the user gave ratings for podcasts 1 to 3 as follows:

User ratings

Now we will multiply our input user ratings matrix with the podcast matrix as above
We get the weighted genre matrix:

Weighted genre matrix

This matrix shows the interest of the user in each genre based on the podcasts listened to by the user.
We will now aggregate the weighted genre matrix and normalize it.
We have the user profile matrix

User profile matrix

Now let’s tackle the remaining 3 podcasts which the user hasn't interacted with...yet.
One-hot encode the remaining 3 podcasts as above.

Alt Text

Now if we aggregate or sum over the podcasts based on the above table we get the following vector

Recommendation matrix

Therefore, podcast 4 is most probably likeable by our user.

This was an example of content-based recommendation.
I will be writing about collaborative filtering soon! ;)

Top comments (1)

Collapse
 
per-starke-642 profile image
Per Starke

Great example!