Skip to content

Instantly share code, notes, and snippets.

@coreylynch
Last active August 29, 2015 14:10
Show Gist options
  • Save coreylynch/0faf5d801e14b0c745c3 to your computer and use it in GitHub Desktop.
Save coreylynch/0faf5d801e14b0c745c3 to your computer and use it in GitHub Desktop.
with open("predictions.txt","wb") as f:
for i in range(len(test_data)):
line = test_data[i]["user_id"]+"\t"+test_data[i]["movie_id"]+"\t"+str(preds[i])
f.write(line+"\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment