Skip to content

Commit d38f4d0

Browse files
committed
DOC + PEP8 SVMlight loader
1 parent 96af5ae commit d38f4d0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

sklearn/datasets/svmlight_format.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,14 @@ def load_svmlight_file(f, n_features=None, dtype=np.float64,
7575
where X is a scipy.sparse matrix of shape (n_samples, n_features),
7676
y is a ndarray of shape (n_samples,), or, in the multilabel case,
7777
a list of tuples of length n_samples.
78+
79+
See also
80+
--------
81+
load_svmlight_files: similar function for loading multiple files in this
82+
format, enforcing the same number of features/columns on all of them.
7883
"""
7984
return tuple(load_svmlight_files([f], n_features, dtype, multilabel,
80-
zero_based))
85+
zero_based))
8186

8287

8388
def _open_and_load(f, dtype, multilabel, zero_based):
@@ -127,7 +132,7 @@ def load_svmlight_files(files, n_features=None, dtype=np.float64,
127132
When fitting a model to a matrix X_train and evaluating it against a
128133
matrix X_test, it is essential that X_train and X_test have the same
129134
number of features (X_train.shape[1] == X_test.shape[1]). This may not
130-
be the case if you load them with load_svmlight_file separately.
135+
be the case if you load the files individually with load_svmlight_file.
131136
132137
See also
133138
--------

0 commit comments

Comments
 (0)