7 #ifndef TREELITE_DATA_H_ 8 #define TREELITE_DATA_H_ 10 #include <dmlc/data.h> 37 num_row = num_col = nelem = 0;
47 static DMatrix*
Create(
const char* filename,
const char* format,
48 int nthread,
int verbose);
59 int nthread,
int verbose);
64 #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