36 if (fabs(update) == 0.)
50 float32_t* w = &weights[f->weight_index & thread_mask];
51 w[1] += g * f->x * f->x;
65 quad_update(weights, *temp.
begin, ex->
atomics[(int32_t)(i[1])], thread_mask, update, g, ex, ctr);
74 update *= page_feature.
x;
75 float32_t update2 = g * page_feature.
x * page_feature.
x;
79 float32_t* w = &weights[(halfhash + elem->weight_index) & mask];
80 w[1] += update2 * elem->x * elem->x;
uint32_t weight_index
Hashed index in weight vector.
uint32_t vw_size_t
vw_size_t typedef to work across platforms
T get_element(int32_t index) const
T * end
Pointer to last set element in the array.
T * begin
Pointer to first element of the array.
Class CVwEnvironment is the environment used by VW.
CLossFunction * loss
Loss function.
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.
float32_t label
Label value.
v_array< vw_size_t > indices
Array of namespaces.
static float32_t invsqrt(float32_t x)
x^0.5, x being a complex128_t
float32_t weight
Weight of example.
Base class for all VW learners.
DynArray< char * > pairs
Pairs of features to cross for quadratic updates.
float32_t final_prediction
Final prediction.
virtual void train(VwExample *&ex, float32_t update)
float32_t x
Feature value.
all of classes and functions are contained in the shogun namespace
CVwEnvironment * env
Environment.
VwLabel * ld
Label object.
vw_size_t thread_mask
Mask used by regressor for learning.
virtual ~CVwAdaptiveLearner()
virtual float64_t get_square_grad(float64_t prediction, float64_t label)=0
v_array< VwFeature > atomics[256]
Array of features.