Medial Code Documentation
|
one row of training instance More...
#include <data.h>
Public Member Functions | |
IndexType | get_field (size_t i) const |
IndexType | get_index (size_t i) const |
DType | get_value (size_t i) const |
DType | get_label () const |
real_t | get_weight () const |
uint64_t | get_qid () const |
template<typename V > | |
V | SDot (const V *weight, size_t size) const |
helper function to compute dot product of current | |
Data Fields | |
const DType * | label |
label of the instance | |
const real_t * | weight |
weight of the instance | |
const uint64_t * | qid |
session-id of the instance | |
size_t | length |
length of the sparse vector | |
const IndexType * | field |
field of each instance | |
const IndexType * | index |
index of each instance | |
const DType * | value |
array value of each instance, this can be NULL indicating every value is set to be 1 | |
one row of training instance
IndexType | type of index |
DType | type of data (both label and value will be of DType |
|
inline |
i | the input index |
|
inline |
i | the input index |
|
inline |
|
inline |
|
inline |
i | the input index |
|
inline |
|
inline |
helper function to compute dot product of current
weight | the dense array of weight we want to product |
size | the size of the weight vector |
V | type of the weight vector |