Recommender system to find music

Problem:

I need on building recommender systems to find music that interest users.

Solution:

I built  a personalized model, and showed the significant improvement provided by personalization. I’m going to explore the song data and the recommendations made by my model.

Download:

Start:

# Use Graphlab library
import graphlab
# Use Sframe of Graphlab to load data
song_data = graphlab.SFrame('song_data.gl/')
# Create Users to contain all users are unique
users = song_data['user_id'].unique()
# Create Train Data, Test Data
train_data,test_data = song_data.random_split(.8,seed=0)
# Use similarity recommender
personalized_model = graphlab.item_similarity_recommender.create(train_data,
                                                                 user_id='user_id',
                                                                 item_id='song')
# Use the persionalized model to find similar songs to any song in the dataset
personalized_model.get_similar_items(['With Or Without You - U2'])
Screen Shot 2016-01-25 at 5.39.14 PM
#the personalized model to make song recommendations
personalized_model.recommend(users=[users[0]])
Screen Shot 2016-01-25 at 5.41.02 PM

Finish

Share this

Related Posts

Previous
Next Post »