Recommender Systems and my experiment with Music Recommendation

If you bought something from Amazon or watched a video on YouTube then you have interacted with a Recommender system in action, suggesting you more things to buy or watch.

If you have observed, There is a recommender system in YouTube, Netflix, Spotify and many more web services, suggesting you more things based on your how you interact with System.

From this observation if we deduce a definition, we can say that recommender system is a type of system which suggests you similar things based on your interaction with the system.

Music Recommender Systems

Almost all of the existing music services we have recommendation feature. They use different approaches for the recommendation which varies on a case to case basis

Basically, recommender system can be categorized into three types

  1. Collaborative Filtering
  2. Content Based Filtering
  3. Hybrid Recommender System

Each of them has their own pros and cons, for example Collaborative Filtering suffers from Cold start, which can be solved by Active Learning

State of the art systems uses ensemble of methods mentioned above.

Almost all of them incorporates some sort of feedback loops which improves the system over time in a semi-supervised manner

Project Recommend

What is Recommend?

Recommend can be considered a technical experiment or poor man’s recommender system.

Our goal was to do recommendation under these constraints.

  • provide the recommendation to the user on his offline music collection
  • have no or limited internet connectivity.
  • don’t have a big database of user history/data.

By offline music collection, we mean the music stored on your computer. (we are looking into only mp3 files in this experiment).

How it works

It’s just K-Means which clusters your whole music into a fixed number of clusters based on ID3 tags. and cluster in which currently playing song is present.

Since this experiment was my course project, We stopped working on it right after we completed that semester.

Project Recommend is on GitHub along with It’s docs.

Check out Software Requirements Specification Document to know more about its internals

Final thoughts

It was a technical experiment with some set of learning outcomes, we learned more then what we expected to learn from this project.

We learned few things from this project, which are -

  • Don’t over-engineer things
  • Focus on what you are building, build core first then focus on side goals.
  • Sometimes simple and Naïve approaches can give you good results, you should try to maximize the results while keeping the system as simple as possible
  • Write tests (unit & integration) along with code, don’t leave them for later
  • K means is not anywhere near the best method for building recommendation since it does most of its computation during inference time, and not during training time. where ideally we want to do most of the computation during training, not during computation.

This project was designed to swap out the recommendation component and our goal was to try out and compare bunch of recommendation methods, but I didn’t have time to finish it.

All in all, it was fun building this project even we never finished it, we learned a lot of things while building it.

This Project was my gateway to ML world, It was naive me trying to figure out things so code is pretty messy.


Continue Reading