|
Medial Code Documentation
|
a block of data, containing several rows in sparse matrix This is useful for (streaming-sxtyle) algorithms that scans through rows of data examples include: SGD, GD, L-BFGS, kmeans More...
#include <data.h>
Public Member Functions | |
| Row< IndexType, DType > | operator[] (size_t rowid) const |
| get specific rows in the batch | |
| size_t | MemCostBytes (void) const |
| RowBlock | Slice (size_t begin, size_t end) const |
| slice a RowBlock to get rows in [begin, end) | |
Data Fields | |
| size_t | size |
| batch size | |
| const size_t * | offset |
| array[size+1], row pointer to beginning of each rows | |
| const DType * | label |
| array[size] label of each instance | |
| const real_t * | weight |
| With weight: array[size] label of each instance, otherwise nullptr. | |
| const uint64_t * | qid |
| With qid: array[size] session id of each instance, otherwise nullptr. | |
| const IndexType * | field |
| field id | |
| const IndexType * | index |
| feature index | |
| const DType * | value |
| feature value, can be NULL, indicating all values are 1 | |
a block of data, containing several rows in sparse matrix This is useful for (streaming-sxtyle) algorithms that scans through rows of data examples include: SGD, GD, L-BFGS, kmeans
The size of batch is usually large enough so that parallelizing over the rows can give significant speedup
| IndexType | type to store the index used in row batch |
| DType | type to store the label and value used in row batch |
|
inline |
|
inline |
get specific rows in the batch
| rowid | the rowid in that row |
|
inline |