Skip to content

Instantly share code, notes, and snippets.

@mahermalaeb
mahermalaeb / surprise_tutorial.py
Last active November 21, 2019 02:03
The easy guide for building python collaborative filtering recommendation system in 2017
import zipfile
from surprise import Reader, Dataset, SVD, evaluate
# Unzip ml-100k.zip
zipfile = zipfile.ZipFile('ml-100k.zip', 'r')
zipfile.extractall()
zipfile.close()
# Read data into an array of strings
with open('./ml-100k/u.data') as f: