7 #ifndef TREELITE_DATA_H_ 8 #define TREELITE_DATA_H_ 11 #include <dmlc/data.h> 38 num_row = num_col = nelem = 0;
48 static DMatrix*
Create(
const char* filename,
const char* format,
49 int nthread,
int verbose);
60 int nthread,
int verbose);
65 #endif // TREELITE_DATA_H_ std::vector< float > data
feature values
std::vector< uint32_t > col_ind
feature indices
static DMatrix * Create(const char *filename, const char *format, int nthread, int verbose)
construct a new DMatrix from a file
size_t num_row
number of rows
a simple data matrix in CSR (Compressed Sparse Row) storage
void Clear()
clear all data fields
size_t num_col
number of columns
size_t nelem
number of nonzero entries
std::vector< size_t > row_ptr
pointer to row headers; length of [num_row] + 1