Skip to content

Instantly share code, notes, and snippets.

@victorkohler
Last active August 1, 2017 09:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save victorkohler/d8a006ee826a65c3e13d3ede3041b221 to your computer and use it in GitHub Desktop.
Save victorkohler/d8a006ee826a65c3e13d3ede3041b221 to your computer and use it in GitHub Desktop.
import pandas as pd
import numpy as np
from sklearn.metrics.pairwise import cosine_similarity
from scipy import sparse
#------------------
# LOAD THE DATASET
#------------------
data = pd.read_csv('data/lastfm.csv')
# Create a new dataframe without the user ids.
data_items = data.drop('user', 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment