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>
|
size_t | size |
| batch size More...
|
|
const size_t * | offset |
| array[size+1], row pointer to beginning of each rows More...
|
|
const DType * | label |
| array[size] label of each instance More...
|
|
const real_t * | weight |
| With weight: array[size] label of each instance, otherwise nullptr. More...
|
|
const uint64_t * | qid |
| With qid: array[size] session id of each instance, otherwise nullptr. More...
|
|
const IndexType * | field |
| field id More...
|
|
const IndexType * | index |
| feature index More...
|
|
const DType * | value |
| feature value, can be NULL, indicating all values are 1 More...
|
|
template<typename IndexType, typename DType = real_t>
struct dmlc::RowBlock< IndexType, DType >
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
- Template Parameters
-
IndexType | type to store the index used in row batch |
DType | type to store the label and value used in row batch |
template<typename IndexType , typename DType = real_t>
size_t dmlc::RowBlock< IndexType, DType >::MemCostBytes |
( |
void |
| ) |
const |
|
inline |
- Returns
- memory cost of the block in bytes
template<typename IndexType , typename DType >
Row< IndexType, DType > dmlc::RowBlock< IndexType, DType >::operator[] |
( |
size_t |
rowid | ) |
const |
|
inline |
get specific rows in the batch
- Parameters
-
rowid | the rowid in that row |
- Returns
- the instance corresponding to the row
template<typename IndexType , typename DType = real_t>
slice a RowBlock to get rows in [begin, end)
- Parameters
-
begin | the begin row index |
end | the end row index |
- Returns
- the sliced RowBlock
template<typename IndexType , typename DType = real_t>
template<typename IndexType , typename DType = real_t>
template<typename IndexType , typename DType = real_t>
array[size] label of each instance
template<typename IndexType , typename DType = real_t>
array[size+1], row pointer to beginning of each rows
template<typename IndexType , typename DType = real_t>
With qid: array[size] session id of each instance, otherwise nullptr.
template<typename IndexType , typename DType = real_t>
template<typename IndexType , typename DType = real_t>
feature value, can be NULL, indicating all values are 1
template<typename IndexType , typename DType = real_t>
With weight: array[size] label of each instance, otherwise nullptr.
The documentation for this struct was generated from the following file:
- /work/mxnet/3rdparty/dmlc-core/include/dmlc/data.h