treelite
|
Functions | |
int | TreeliteDMatrixCreateFromFile (const char *path, const char *format, int nthread, int verbose, DMatrixHandle *out) |
create DMatrix from a file More... | |
int | TreeliteDMatrixCreateFromCSR (const float *data, const unsigned *col_ind, const size_t *row_ptr, size_t num_row, size_t num_col, DMatrixHandle *out) |
create DMatrix from a (in-memory) CSR matrix More... | |
int | TreeliteDMatrixCreateFromMat (const float *data, size_t num_row, size_t num_col, float missing_value, DMatrixHandle *out) |
create DMatrix from a (in-memory) dense matrix More... | |
int | TreeliteDMatrixGetDimension (DMatrixHandle handle, size_t *out_num_row, size_t *out_num_col, size_t *out_nelem) |
get dimensions of a DMatrix More... | |
int | TreeliteDMatrixGetPreview (DMatrixHandle handle, const char **out_preview) |
produce a human-readable preview of a DMatrix Will print first and last 25 non-zero entries, along with their locations More... | |
int | TreeliteDMatrixGetArrays (DMatrixHandle handle, const float **out_data, const uint32_t **out_col_ind, const size_t **out_row_ptr) |
extract three arrays (data, col_ind, row_ptr) that define a DMatrix. More... | |
int | TreeliteDMatrixFree (DMatrixHandle handle) |
delete DMatrix from memory More... | |
Data matrix interface
int TreeliteDMatrixCreateFromCSR | ( | const float * | data, |
const unsigned * | col_ind, | ||
const size_t * | row_ptr, | ||
size_t | num_row, | ||
size_t | num_col, | ||
DMatrixHandle * | out | ||
) |
int TreeliteDMatrixCreateFromFile | ( | const char * | path, |
const char * | format, | ||
int | nthread, | ||
int | verbose, | ||
DMatrixHandle * | out | ||
) |
int TreeliteDMatrixCreateFromMat | ( | const float * | data, |
size_t | num_row, | ||
size_t | num_col, | ||
float | missing_value, | ||
DMatrixHandle * | out | ||
) |
int TreeliteDMatrixFree | ( | DMatrixHandle | handle | ) |
int TreeliteDMatrixGetArrays | ( | DMatrixHandle | handle, |
const float ** | out_data, | ||
const uint32_t ** | out_col_ind, | ||
const size_t ** | out_row_ptr | ||
) |
extract three arrays (data, col_ind, row_ptr) that define a DMatrix.
handle | handle to DMatrix |
out_data | used to save pointer to array containing feature values |
out_col_ind | used to save pointer to array containing feature indices |
out_row_ptr | used to save pointer to array containing pointers to row headers |
int TreeliteDMatrixGetDimension | ( | DMatrixHandle | handle, |
size_t * | out_num_row, | ||
size_t * | out_num_col, | ||
size_t * | out_nelem | ||
) |
int TreeliteDMatrixGetPreview | ( | DMatrixHandle | handle, |
const char ** | out_preview | ||
) |