| xgb.QuantileDMatrix.from_iterator | R Documentation |
Create an xgb.QuantileDMatrix object (exact same class as would be returned by
calling function xgb.QuantileDMatrix(), with the same advantages and limitations) from
external data supplied by xgb.DataIter(), potentially passed in batches from
a bigger set that might not fit entirely in memory, same way as xgb.ExtMemDMatrix().
Note that, while external data will only be loaded through the iterator (thus the full data might not be held entirely in-memory), the quantized representation of the data will get created in-memory, being concatenated from multiple calls to the data iterator. The quantized version is typically lighter than the original data, so there might be cases in which this representation could potentially fit in memory even if the full data does not.
For more information, see the guide 'Using XGBoost External Memory Version': https://xgboost.readthedocs.io/en/stable/tutorials/external_memory.html
xgb.QuantileDMatrix.from_iterator(
data_iterator,
missing = NA,
nthread = NULL,
ref = NULL,
max_bin = NULL
)
data_iterator |
A data iterator structure as returned by |
missing |
A float value to represents missing values in data. Note that, while functions like For example, in R |
nthread |
Number of threads used for creating DMatrix. |
ref |
The training dataset that provides quantile information, needed when creating
validation/test dataset with |
max_bin |
The number of histogram bin, should be consistent with the training parameter
This is only supported when constructing a QuantileDMatrix. |
An 'xgb.DMatrix' object, with subclass 'xgb.QuantileDMatrix'.
xgb.DataIter(), xgb.DataBatch(), xgb.ExtMemDMatrix(),
xgb.QuantileDMatrix()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.