Update Python doc. [skip ci] (#5517)
* Update doc for copying booster. [skip ci] The issue is resolved in #5312 . * Add version for new APIs. [skip ci]
This commit is contained in:
parent
88b64c8162
commit
c90119eb67
@ -1048,6 +1048,9 @@ class DeviceQuantileDMatrix(DMatrix):
|
||||
quantisation.
|
||||
|
||||
You can construct DeviceQuantileDMatrix from cupy/cudf/dlpack.
|
||||
|
||||
.. versionadded:: 1.1.0
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, data, label=None, weight=None, base_margin=None,
|
||||
@ -1197,7 +1200,10 @@ class Booster(object):
|
||||
|
||||
def save_config(self):
|
||||
'''Output internal parameter configuration of Booster as a JSON
|
||||
string.'''
|
||||
string.
|
||||
|
||||
.. versionadded:: 1.0.0
|
||||
'''
|
||||
json_string = ctypes.c_char_p()
|
||||
length = c_bst_ulong()
|
||||
_check_call(_LIB.XGBoosterSaveJsonConfig(
|
||||
@ -1208,7 +1214,10 @@ class Booster(object):
|
||||
return json_string
|
||||
|
||||
def load_config(self, config):
|
||||
'''Load configuration returned by `save_config`.'''
|
||||
'''Load configuration returned by `save_config`.
|
||||
|
||||
.. versionadded:: 1.0.0
|
||||
'''
|
||||
assert isinstance(config, str)
|
||||
_check_call(_LIB.XGBoosterLoadJsonConfig(
|
||||
self.handle,
|
||||
@ -1218,11 +1227,7 @@ class Booster(object):
|
||||
return self.__deepcopy__(None)
|
||||
|
||||
def __deepcopy__(self, _):
|
||||
'''Return a copy of booster. Caches for DMatrix are not copied so continue
|
||||
training on copied booster will result in lower performance and
|
||||
slightly different result.
|
||||
|
||||
'''
|
||||
'''Return a copy of booster.'''
|
||||
return Booster(model_file=self)
|
||||
|
||||
def copy(self):
|
||||
@ -1517,6 +1522,8 @@ class Booster(object):
|
||||
Whether the prediction value is used for training. This can effect
|
||||
`dart` booster, which performs dropouts during training iterations.
|
||||
|
||||
.. versionadded:: 1.0.0
|
||||
|
||||
.. note:: Using ``predict()`` with DART booster
|
||||
|
||||
If the booster object is DART type, ``predict()`` will not perform
|
||||
@ -1601,6 +1608,8 @@ class Booster(object):
|
||||
booster.set_param({'predictor': 'cpu_predictor})
|
||||
booster.inplace_predict(numpy_array)
|
||||
|
||||
.. versionadded:: 1.1.0
|
||||
|
||||
Parameters
|
||||
----------
|
||||
data : numpy.ndarray/scipy.sparse.csr_matrix/cupy.ndarray/
|
||||
|
||||
@ -126,6 +126,8 @@ class DaskDMatrix:
|
||||
the input data explicitly if you want to see actual computation of
|
||||
constructing `DaskDMatrix`.
|
||||
|
||||
.. versionadded:: 1.0.0
|
||||
|
||||
Parameters
|
||||
----------
|
||||
client: dask.distributed.Client
|
||||
@ -368,6 +370,8 @@ def _get_rabit_args(worker_map, client):
|
||||
def train(client, params, dtrain, *args, evals=(), **kwargs):
|
||||
'''Train XGBoost model.
|
||||
|
||||
.. versionadded:: 1.0.0
|
||||
|
||||
Parameters
|
||||
----------
|
||||
client: dask.distributed.Client
|
||||
@ -459,6 +463,8 @@ def predict(client, model, data, *args, missing=numpy.nan):
|
||||
|
||||
Only default prediction mode is supported right now.
|
||||
|
||||
.. versionadded:: 1.0.0
|
||||
|
||||
Parameters
|
||||
----------
|
||||
client: dask.distributed.Client
|
||||
@ -582,6 +588,8 @@ def inplace_predict(client, model, data,
|
||||
missing=numpy.nan):
|
||||
'''Inplace prediction.
|
||||
|
||||
.. versionadded:: 1.1.0
|
||||
|
||||
Parameters
|
||||
----------
|
||||
client: dask.distributed.Client
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user