Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Protected Attributes
quantile_data_iterator.IterForDMatrixDemo Class Reference
Inheritance diagram for quantile_data_iterator.IterForDMatrixDemo:
xgboost.core.DataIter

Public Member Functions

 __init__ (self)
 
 as_array (self)
 
 as_array_labels (self)
 
 as_array_weights (self)
 
 data (self)
 
 labels (self)
 
 weights (self)
 
 reset (self)
 
 next (self, input_data)
 
- Public Member Functions inherited from xgboost.core.DataIter
Tuple[Callable, Callable] get_callbacks (self, bool allow_host, bool enable_categorical)
 
"_ProxyDMatrix" proxy (self)
 
None reraise (self)
 
None __del__ (self)
 

Data Fields

 rows
 
 cols
 
 it
 
- Data Fields inherited from xgboost.core.DataIter
 cache_prefix
 
 proxy
 

Protected Attributes

 _data
 
 _labels
 
 _weights
 
- Protected Attributes inherited from xgboost.core.DataIter
 _handle
 
 _enable_categorical
 
 _allow_host
 
 _release
 
 _reset_callback
 
 _next_callback
 
 _next_wrapper
 
 _exception
 
 _temporary_data
 
 _data_ref
 

Additional Inherited Members

- Protected Member Functions inherited from xgboost.core.DataIter
_T _handle_exception (self, Callable fn, _T dft_ret)
 
None _reset_wrapper (self, None this)
 
int _next_wrapper (self, None this)
 

Detailed Description

A data iterator for XGBoost DMatrix.

`reset` and `next` are required for any data iterator, other functions here
are utilites for demonstration's purpose.

Constructor & Destructor Documentation

◆ __init__()

quantile_data_iterator.IterForDMatrixDemo.__init__ (   self)
Generate some random data for demostration.

Actual data can be anything that is currently supported by XGBoost.

Reimplemented from xgboost.core.DataIter.

Member Function Documentation

◆ data()

quantile_data_iterator.IterForDMatrixDemo.data (   self)
Utility function for obtaining current batch of data.

◆ labels()

quantile_data_iterator.IterForDMatrixDemo.labels (   self)
Utility function for obtaining current batch of label.

◆ next()

quantile_data_iterator.IterForDMatrixDemo.next (   self,
  input_data 
)
Yield next batch of data.

Reimplemented from xgboost.core.DataIter.

◆ reset()

quantile_data_iterator.IterForDMatrixDemo.reset (   self)
Reset the iterator

Reimplemented from xgboost.core.DataIter.


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