Fix DMatrix doc. (#4884)
This commit is contained in:
parent
fc8c9b0521
commit
c7416002e9
@ -368,20 +368,19 @@ class DMatrix(object):
|
|||||||
weight=None, silent=False,
|
weight=None, silent=False,
|
||||||
feature_names=None, feature_types=None,
|
feature_names=None, feature_types=None,
|
||||||
nthread=None):
|
nthread=None):
|
||||||
"""
|
"""Parameters
|
||||||
Parameters
|
|
||||||
----------
|
----------
|
||||||
data : os.PathLike/string/numpy.array/scipy.sparse/pd.DataFrame/
|
data : os.PathLike/string/numpy.array/scipy.sparse/pd.DataFrame/
|
||||||
dt.Frame/cudf.DataFrame
|
dt.Frame/cudf.DataFrame
|
||||||
Data source of DMatrix.
|
Data source of DMatrix.
|
||||||
When data is string or os.PathLike type, it represents the path libsvm format
|
When data is string or os.PathLike type, it represents the path libsvm format
|
||||||
txt file, or binary file that xgboost can read from.
|
txt file, or binary file that xgboost can read from.
|
||||||
label : list or numpy 1-D array, optional
|
label : list, numpy 1-D array or cudf.DataFrame, optional
|
||||||
Label of the training data.
|
Label of the training data.
|
||||||
missing : float, optional
|
missing : float, optional
|
||||||
Value in the dense input data (e.g. `numpy.ndarray`) which needs
|
Value in the input data which needs to be present as a missing
|
||||||
to be present as a missing value. If None, defaults to np.nan.
|
value. If None, defaults to np.nan.
|
||||||
weight : list or numpy 1-D array , optional
|
weight : list, numpy 1-D array or cudf.DataFrame , optional
|
||||||
Weight for each instance.
|
Weight for each instance.
|
||||||
|
|
||||||
.. note:: For ranking task, weights are per-group.
|
.. note:: For ranking task, weights are per-group.
|
||||||
@ -400,6 +399,7 @@ class DMatrix(object):
|
|||||||
nthread : integer, optional
|
nthread : integer, optional
|
||||||
Number of threads to use for loading data from numpy array. If -1,
|
Number of threads to use for loading data from numpy array. If -1,
|
||||||
uses maximum threads available on the system.
|
uses maximum threads available on the system.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# force into void_p, mac need to pass things in as void_p
|
# force into void_p, mac need to pass things in as void_p
|
||||||
if data is None:
|
if data is None:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user