Created
September 29, 2014 16:36
-
-
Save up1/c7cf472390b0f7c73e20 to your computer and use it in GitHub Desktop.
GraphLab :: demo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import graphlab | |
graphlab.canvas.set_target('ipynb') | |
data = graphlab.SFrame.read_csv("http://s3.amazonaws.com/GraphLab-Datasets/movie_ratings/training_data.csv", column_type_hints={"rating":int}) | |
data.head() | |
model = graphlab.recommender.create(data, user_id="user", item_id="movie", target="rating") | |
results = model.recommend(users=None, k=5) | |
results.head() | |
model.save("my_model") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment