| xgb.DataIter | R Documentation |
Interface to create a custom data iterator in order to construct a DMatrix from external memory.
This function is responsible for generating an R object structure containing callback functions and an environment shared with them.
The output structure from this function is then meant to be passed to xgb.ExtMemDMatrix(),
which will consume the data and create a DMatrix from it by executing the callback functions.
For more information, and for a usage example, see the documentation for xgb.ExtMemDMatrix().
xgb.DataIter(env = new.env(), f_next, f_reset)
env |
An R environment to pass to the callback functions supplied here, which can be used to keep track of variables to determine how to handle the batches. For example, one might want to keep track of an iteration number in this environment in order to know which part of the data to pass next. |
f_next |
|
f_reset |
Note that, after resetting the iterator, the batches will be accessed again, so the same data (and in the same order) must be passed in subsequent iterations. |
An xgb.DataIter object, containing the same inputs supplied here, which can then
be passed to xgb.ExtMemDMatrix().
xgb.ExtMemDMatrix(), xgb.DataBatch().
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.