Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions
xgboost::RandomDataGenerator Class Reference

Public Member Functions

 RandomDataGenerator (bst_row_t rows, size_t cols, float sparsity)
 
RandomDataGeneratorLower (float v)
 
RandomDataGeneratorUpper (float v)
 
RandomDataGeneratorDevice (int32_t d)
 
RandomDataGeneratorBatches (std::size_t n_batches)
 
RandomDataGeneratorSeed (uint64_t s)
 
RandomDataGeneratorBins (bst_bin_t b)
 
RandomDataGeneratorType (common::Span< FeatureType > ft)
 
RandomDataGeneratorMaxCategory (bst_cat_t cat)
 
RandomDataGeneratorTargets (bst_target_t n_targets)
 
void GenerateDense (HostDeviceVector< float > *out) const
 
std::string GenerateArrayInterface (HostDeviceVector< float > *storage) const
 
std::pair< std::vector< std::string >, std::string > GenerateArrayInterfaceBatch (HostDeviceVector< float > *storage, size_t batches) const
 Generate batches of array interface stored in consecutive memory.
 
std::string GenerateColumnarArrayInterface (std::vector< HostDeviceVector< float > > *data) const
 
void GenerateCSR (HostDeviceVector< float > *value, HostDeviceVector< bst_row_t > *row_ptr, HostDeviceVector< bst_feature_t > *columns) const
 
std::shared_ptr< DMatrixGenerateDMatrix (bool with_label=false, bool float_label=true, size_t classes=1) const
 
std::shared_ptr< DMatrixGenerateSparsePageDMatrix (std::string prefix, bool with_label) const
 
std::shared_ptr< DMatrixGenerateQuantileDMatrix (bool with_label)
 

Member Function Documentation

◆ GenerateArrayInterfaceBatch()

std::pair< std::vector< std::string >, std::string > xgboost::RandomDataGenerator::GenerateArrayInterfaceBatch ( HostDeviceVector< float > *  storage,
size_t  batches 
) const

Generate batches of array interface stored in consecutive memory.

Parameters
storageThe consecutive momory used to store the arrays.
batchesNumber of batches.
Returns
A vector storing JSON string representation of interface for each batch, and a single JSON string representing the consecutive memory as a whole (combining all the batches).

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