36 if (fabs(update) == 0.)
46 weights[f->weight_index & thread_mask] += update * f->x;
57 quad_update(weights, *temp.
begin, ex->
atomics[(int32_t)(i[1])], thread_mask, update);
64 update *= page_feature.
x;
66 weights[(halfhash + elem->weight_index) & mask] += update * elem->x;
uint32_t weight_index
Hashed index in weight vector.
uint32_t vw_size_t
vw_size_t typedef to work across platforms
virtual void train(VwExample *&ex, float32_t update)
T get_element(int32_t index) const
T * end
Pointer to last set element in the array.
virtual ~CVwNonAdaptiveLearner()
T * begin
Pointer to first element of the array.
Class CVwEnvironment is the environment used by VW.
void(* update)(float *foo, float bar)
Class v_array taken directly from JL's implementation.
CVwRegressor * reg
Regressor object that will be used for getting updates.
float32_t ** weight_vectors
Weight vectors, one array for each thread.
int32_t get_num_elements() const
const int32_t quadratic_constant
Constant used while hashing/accessing quadratic features.
v_array< vw_size_t > indices
Array of namespaces.
Base class for all VW learners.
DynArray< char * > pairs
Pairs of features to cross for quadratic updates.
float32_t x
Feature value.
all of classes and functions are contained in the shogun namespace
CVwEnvironment * env
Environment.
vw_size_t thread_mask
Mask used by regressor for learning.
v_array< VwFeature > atomics[256]
Array of features.