I'm interested in getting a user's past listening history from Spotify (API call to recently played) and being able to suggest songs from the Charts (another API call for current chat listings) that a user may be interested in listening to.

It's clear that you could use Genre to support this type of algorithm, the more times a user listenes to a genere, it has a higher likelihood of being suggested from the Charts (weight?).

I'd like to focus on the activity of a single user and not necessarily other users using the system (content based filtering and not collaborative filtering)

How can this be done in practice? Are there any examples of algorithms or tutorials anywhere?

  • $\begingroup$ Typical methods use a similarity metric between items (in your case, songs). If you can define a "distance" (dissimilarity) metric between two lists of genres (I think music systems nowadays use list of genres instead of a single genre?), you can then use a learning method that uses dissimilarity metrics such as KNN. $\endgroup$ – Mephy Jun 1 at 14:15
  • $\begingroup$ @Mephy thanks for that, what would a dissimilarity be between two genres? Obviously rock and dance are two very different genres but how would one compute that? Thanks! $\endgroup$ – Jacob Clark Jun 1 at 14:31
  • $\begingroup$ that depends on your design. You could define such function by checking existing playlists and checking the co-occurrence between the genres or something like that. Or you could define that manually. There's no right answer. $\endgroup$ – Mephy Jun 1 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.