@@ -230,7 +230,7 @@ def load_svmlight_files(
230
230
offset = 0 ,
231
231
length = - 1 ,
232
232
):
233
- """Load dataset from multiple files in SVMlight format
233
+ """Load dataset from multiple files in SVMlight format.
234
234
235
235
This function is equivalent to mapping load_svmlight_file over a list of
236
236
files, except that the results are concatenated into a single, flat list
@@ -268,7 +268,7 @@ def load_svmlight_files(
268
268
269
269
multilabel : bool, default=False
270
270
Samples may have several labels each (see
271
- https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multilabel.html)
271
+ https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multilabel.html).
272
272
273
273
zero_based : bool or "auto", default="auto"
274
274
Whether column indices in f are zero-based (True) or one-based
@@ -296,23 +296,22 @@ def load_svmlight_files(
296
296
297
297
Returns
298
298
-------
299
- [X1, y1, ..., Xn, yn]
300
- where each (Xi, yi) pair is the result from load_svmlight_file(files[i]).
299
+ [X1, y1, ..., Xn, yn] or [X1, y1, q1, ..., Xn, yn, qn]: list of arrays
300
+ Each (Xi, yi) pair is the result from load_svmlight_file(files[i]).
301
+ If query_id is set to True, this will return instead (Xi, yi, qi)
302
+ triplets.
301
303
302
- If query_id is set to True, this will return instead [X1, y1, q1,
303
- ..., Xn, yn, qn] where (Xi, yi, qi) is the result from
304
- load_svmlight_file(files[i])
304
+ See Also
305
+ --------
306
+ load_svmlight_file: Similar function for loading a single file in this
307
+ format.
305
308
306
309
Notes
307
310
-----
308
311
When fitting a model to a matrix X_train and evaluating it against a
309
312
matrix X_test, it is essential that X_train and X_test have the same
310
313
number of features (X_train.shape[1] == X_test.shape[1]). This may not
311
314
be the case if you load the files individually with load_svmlight_file.
312
-
313
- See Also
314
- --------
315
- load_svmlight_file
316
315
"""
317
316
if (offset != 0 or length > 0 ) and zero_based == "auto" :
318
317
# disable heuristic search to avoid getting inconsistent results on
0 commit comments