8 #include <sys/socket.h> 27 GD::gd* g =
nullptr, uint32_t ftrl_size = 0);
42 if ((-1e-10 < fx) && (fx < 1e-10))
44 uint64_t mask = mp.
weights.mask();
47 uint64_t top = fi + (uint64_t)((mp.
count - 1) * mp.
step);
52 for (; i <= top; i += mp.
step, ++p)
57 for (
size_t c = 0;
c < mp.
count; ++
c, fi += (uint64_t)mp.
step, ++p)
65 template <
class R,
typename T>
74 template <
class R,
class S,
void (*T)(R&,
float, S)>
86 template <
class R,
void (*T)(R&,
float,
float&)>
89 foreach_feature<R, float&, T>(all, ec, dat);
92 template <
class R,
void (*T)(R&,
float, const
float&)>
95 foreach_feature<R, const float&, T>(all, ec, dat);
116 return (gravity < fabsf(w)) ? w -
sign(w) *
gravity : 0.f;
float finalize_prediction(shared_data *sd, float ret)
base_learner * setup(options_i &options, vw &all)
void print_audit_features(vw &all, example &ec)
std::vector< std::string > * interactions
the core definition of a set of features.
void vec_add_multipredict(multipredict_info< T > &mp, const float fx, uint64_t fi)
float inline_predict(vw &all, example &ec)
float trunc_weight(const float w, const float gravity)
void save_load_online_state(vw &all, io_buf &model_file, bool read, bool text, gd *g, std::stringstream &msg, uint32_t ftrl_size, T &weights)
std::array< bool, NUM_NAMESPACES > ignore_linear
dense_parameters dense_weights
sparse_parameters sparse_weights
void foreach_feature(vw &all, features &fs, R &dat, uint64_t offset=0, float mult=1.)
void save_load_regressor(vw &all, io_buf &model_file, bool read, bool text, T &weights)