@@ -53,7 +53,7 @@ def load_svmlight_file(
53
53
offset = 0 ,
54
54
length = - 1 ,
55
55
):
56
- """Load datasets in the svmlight / libsvm format into sparse CSR matrix
56
+ """Load datasets in the svmlight / libsvm format into sparse CSR matrix.
57
57
58
58
This format is a text-based format, with one sample per line. It does
59
59
not store zero valued features hence is suitable for sparse dataset.
@@ -106,7 +106,7 @@ def load_svmlight_file(
106
106
107
107
multilabel : bool, default=False
108
108
Samples may have several labels each (see
109
- https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multilabel.html)
109
+ https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multilabel.html).
110
110
111
111
zero_based : bool or "auto", default="auto"
112
112
Whether column indices in f are zero-based (True) or one-based
@@ -135,12 +135,14 @@ def load_svmlight_file(
135
135
Returns
136
136
-------
137
137
X : scipy.sparse matrix of shape (n_samples, n_features)
138
+ The data matrix.
138
139
139
- y : ndarray of shape (n_samples,), or, in the multilabel a list of
140
- tuples of length n_samples.
140
+ y : ndarray of shape (n_samples,), or a list of tuples of length n_samples
141
+ The target. The output type depends on the value of the parameter
142
+ ``multilabel``.
141
143
142
144
query_id : array of shape (n_samples,)
143
- query_id for each sample. Only returned when query_id is set to
145
+ The query_id for each sample. Only returned when query_id is set to
144
146
True.
145
147
146
148
See Also
0 commit comments