Skip to content

Commit ce24484

Browse files
committed
DOC Update documentation to match code
1 parent c055f19 commit ce24484

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ch08/load_ml100k.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66
# It is made available under the MIT License
77

88
def load():
9-
109
'''Load ML-100k data
1110
12-
Returns a sparse matrix'''
11+
Returns the review matrix as a numpy array'''
1312
import numpy as np
1413
from scipy import sparse
14+
15+
# The input is in the form of a CSC sparse matrix, so it's a natural fit to
16+
# load the data, but we then convert to a more traditional array before
17+
# returning
1518
data = np.loadtxt('data/ml-100k/u.data')
1619
ij = data[:, :2]
1720
ij -= 1 # original data is in 1-based system

0 commit comments

Comments
 (0)