Skip to content

Commit

Permalink
Merge pull request #31 from ZiyaoWei/patch-1
Browse files Browse the repository at this point in the history
Fix quickstart.rst sample code
  • Loading branch information
mdekstrand committed Sep 27, 2018
2 parents 4d4b1e2 + 1ec4309 commit 00fa727
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For now, this example computes nDCG for an item-based k-NN collaborative filter:
import pandas as pd
from lenskit import batch, topn
from lenskit import crossfold as xf
from lenskit.algorithms import knn
from lenskit.algorithms import item_knn as knn

ratings = pd.read_csv('ml-100k/u.data', sep='\t',
names=['user', 'item', 'rating', 'timestamp'])
Expand All @@ -29,7 +29,7 @@ For now, this example computes nDCG for an item-based k-NN collaborative filter:

# compute evaluation
splits = xf.partition_users(ratings, 5,
xf.SampleFrac(0.2)
xf.SampleFrac(0.2))
recs = pd.concat((eval(train, test)
for (train, test) in splits))

Expand Down

0 comments on commit 00fa727

Please sign in to comment.