Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes
xgboost.dask.DaskDMatrix Class Reference
Inheritance diagram for xgboost.dask.DaskDMatrix:
xgboost.dask.DaskQuantileDMatrix xgboost.dask.DaskDeviceQuantileDMatrix

Public Member Functions

None __init__ (self, "distributed.Client" client, _DataT data, Optional[_DaskCollection] label=None, *Optional[_DaskCollection] weight=None, Optional[_DaskCollection] base_margin=None, Optional[float] missing=None, bool silent=False, Optional[FeatureNames] feature_names=None, Optional[FeatureTypes] feature_types=None, Optional[_DaskCollection] group=None, Optional[_DaskCollection] qid=None, Optional[_DaskCollection] label_lower_bound=None, Optional[_DaskCollection] label_upper_bound=None, Optional[_DaskCollection] feature_weights=None, bool enable_categorical=False)
 
Generator __await__ (self)
 
int num_col (self)
 

Data Fields

 feature_names
 
 feature_types
 
 missing
 
 enable_categorical
 
 partition_order
 
 worker_map
 
 feature_weights
 
 is_quantile
 

Protected Member Functions

"DaskDMatrix" _map_local_data (self, "distributed.Client" client, _DataT data, Optional[_DaskCollection] label=None, Optional[_DaskCollection] weights=None, Optional[_DaskCollection] base_margin=None, Optional[_DaskCollection] qid=None, Optional[_DaskCollection] feature_weights=None, Optional[_DaskCollection] label_lower_bound=None, Optional[_DaskCollection] label_upper_bound=None)
 
Dict[str, Any] _create_fn_args (self, str worker_addr)
 

Protected Attributes

 _n_cols
 
 _init
 
 _map_local_data
 

Detailed Description

DMatrix holding on references to Dask DataFrame or Dask Array.  Constructing a
`DaskDMatrix` forces all lazy computation to be carried out.  Wait for the input
data explicitly if you want to see actual computation of constructing `DaskDMatrix`.

See doc for :py:obj:`xgboost.DMatrix` constructor for other parameters.  DaskDMatrix
accepts only dask collection.

.. note::

    DaskDMatrix does not repartition or move data between workers.  It's
    the caller's responsibility to balance the data.

.. versionadded:: 1.0.0

Parameters
----------
client :
    Specify the dask client used for training.  Use default client returned from
    dask if it's set to None.

Member Function Documentation

◆ _create_fn_args()

Dict[str, Any] xgboost.dask.DaskDMatrix._create_fn_args (   self,
str  worker_addr 
)
protected
Create a dictionary of objects that can be pickled for function
arguments.

Reimplemented in xgboost.dask.DaskQuantileDMatrix.

◆ _map_local_data()

"DaskDMatrix" xgboost.dask.DaskDMatrix._map_local_data (   self,
"distributed.Client"  client,
_DataT  data,
Optional[_DaskCollection]   label = None,
Optional[_DaskCollection]   weights = None,
Optional[_DaskCollection]   base_margin = None,
Optional[_DaskCollection]   qid = None,
Optional[_DaskCollection]   feature_weights = None,
Optional[_DaskCollection]   label_lower_bound = None,
Optional[_DaskCollection]   label_upper_bound = None 
)
protected
Obtain references to local data.

◆ num_col()

int xgboost.dask.DaskDMatrix.num_col (   self)
Get the number of columns (features) in the DMatrix.

Returns
-------
number of columns

The documentation for this class was generated from the following file: