The goal of this question is to be able to propose a user further choices based on his past experiences: like Amazon's book advices.

From a set of mp3 files, I assume that a set of mp3 tags data is already filled, based on the music he/she has alredy listened to : what is the easiest way to implement a machine learning that is able to propose a list of music choices based on the user's set ?

NB : I'm a Machine learning novice I'd appreciate if the answer could be based on Orange, Weka or these kind of tools.

Update: removed the classification tag as recommanded.

For new comers as me:
- the book Predictive Analytics For Dummies is a nice general introduction about this subject
- a next step would be the the paper Finding Clusters of Similar Artists which is really interesting especially for the K-means approach
- The millions songs dataset which is a gold mine with its huge dataset as well as tutorials with Python codes to use with it
- special thanks sheldonkreger for his answer with neo4J graph usage idea wich is really interesting


4 Answers 4


There are many great ways to handle this problem. It is a recommendation problem, not a classification problem, as pointed out by others. There are many ways to do recommendation with a data set like this. I'll point out a few methods and you can choose one or try them all.

The first method is called user-based collaborative filtering. The basic idea is to give users recommendations based on the tastes of like-minded users. So, you'd be trying to recommend music based on the listening history of users who have listened to the same songs. Such data can be modeled as a graph or sparse matrix. Then, you choose the exact algorithm depending on how you want to model your data.

The second method is called item-based collaborative filtering. Rather than associating users together, this strategy looks at the set of items a user has 'rated' (the songs a user has listened to) and calculates how similar they are to a specific target item (song), or even to all the songs in your data set. It grabs the set of most-similar items and uses various methods to predict how much a user will like the song.

In this case, you only have binary data (user listened to it or they did not). These calculations tend to work best with actual rating scores (like a 5 star system) because this gives more detailed variation amongst items in the data set.

The third option is to model your data in a graph database like Neo4J and write graph traversal queries in order to find similar items. If you like graph theory, this can be a lot of fun. The sky is the limit in regards to what kinds of traversals will return good results. To get started, think of the users and songs as nodes in the graph, and 'listened' as the edge. $user->listened->$song

Because of ratings and item-based filtering, and because there are probably many songs in your data set, and each user only listens to a very small portion of them, I'd first try a user-based collaborative filtering method which uses sparse matrix operations to calculate recommendations. If your data set is large, these computations scale horizontally so you can leverage parallel processing if you run into performance issues.

You can find more detail about collaborative filtering in this paper.


What you are describing is not a classification task. You need to use a recommender engine to do this - that's what they are actually developed for. I suggest you to google 'Mahout in action' book which is brilliantly covers the development of recommender engines. After reading the theory you will be able to find a tool suitable for your task.

  • $\begingroup$ Mahout in Action is a great book if you are comfortable with Java. I would highly suggest it. $\endgroup$ Jun 30, 2015 at 17:09

I'm not sure what you are saying in the second paragraph, but if your assumptions are that all the mp3s are already tagged, then the easiest way to suggest further is to suggest mp3s with the highest overlap in tags.

  • $\begingroup$ Actually to be as clear as possibleI the 1st paragrpah is an intro and the 2nd specifically describes the problem I'd like to solve through machine learning . Anyway, what do you mean "highest overlap" please ? $\endgroup$
    – dlewin
    Jun 24, 2015 at 7:09
  • $\begingroup$ It's not clear what the assumptions are. For example, it's not clear where the tags come from, where you are drawing recommendations from, or whether your set that you want to draw recommendations from is tagged with the same tagset. $\endgroup$ Jun 24, 2015 at 15:14
  • $\begingroup$ "Overlap" means "in common", There are many similarity metrics based on overlap, for example overlap coefficient $\endgroup$ Jun 24, 2015 at 15:15

Would be good to have a look at your data to make a suggestion. If you need to recommend mp3 based on user previous choice then it would make sense to identify what mp3 (genres, length, authors, etc.) are most liked by the user (and what is least), of course if you have such a data for your mp3. Then knowing your user`s preferences you may apply different collaborative approaches.

Here is how I did it with yelp data.

it is not related to mp3, however could work similarly with mp3 in terms of identifying users preferences and recommending mp3 based on that. Hope this will help


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.