30 vw*
initialize(config::options_i& options,
io_buf* model =
nullptr,
bool skipModelLoad =
false,
31 trace_message_t trace_listener =
nullptr,
void* trace_context =
nullptr);
33 trace_message_t trace_listener =
nullptr,
void* trace_context =
nullptr);
34 vw*
initialize(
int argc,
char* argv[],
io_buf* model =
nullptr,
bool skipModelLoad =
false,
35 trace_message_t trace_listener =
nullptr,
void* trace_context =
nullptr);
37 vw* vw_model, std::string extra_args,
trace_message_t trace_listener =
nullptr,
void* trace_context =
nullptr);
40 trace_message_t trace_listener =
nullptr,
void* trace_context =
nullptr);
44 VW_DEPRECATED(
"By value version is deprecated, pass std::string by const ref instead using `to_argv`")
48 char**
to_argv(
std::
string const& s,
int& argc);
57 void finish(
vw& all,
bool delete_all = true);
141 ss.
begin = (
char*)s.c_str();
148 ss.
begin = (
char*)s.c_str();
156 ss.
begin = (
char*)s.c_str();
160 inline uint64_t
hash_feature_static(
const std::string& s, uint64_t u,
const std::string& h, uint32_t num_bits)
163 ss.
begin = (
char*)s.c_str();
165 size_t parse_mark = (1 << num_bits) - 1;
182 inline void set_weight(
vw& all, uint32_t index, uint32_t offset,
float value)
194 fs.
len = features_count;
200 fs.
fs[index].
x = value;
void return_features(feature *f)
vw * seed_vw_model(vw *vw_model, const std::string extra_args, trace_message_t trace_listener, void *trace_context)
void copy_label(void *dst, void *src)
void free_args(int argc, char *argv[])
void clear_example_data(example &)
bool is_ring_example(vw &all, example *ae)
void parse_example_label(vw &all, example &ec, std::string label)
char ** to_argv(std::string const &s, int &argc)
uint32_t get_stride(vw &all)
float get_confidence(example *ec)
void copy_example_metadata(bool, example *dst, example *src)
float get_importance(example *ec)
void setup_example(vw &all, example *ae)
const char * get_tag(example *ec)
void copy_example_data(bool audit, example *dst, example *src)
example * get_example(parser *p)
void dealloc_example(void(*delete_label)(void *), example &ec, void(*delete_prediction)(void *))
void set_feature(primitive_feature_space &fs, size_t index, uint64_t feature_hash, float value)
the core definition of a set of features.
void delete_label(void *v)
uint64_t hash_feature_static(const std::string &s, uint64_t u, const std::string &h, uint32_t num_bits)
char ** get_argv_from_string(std::string s, int &argc)
const char * are_features_compatible(vw &vw1, vw &vw2)
void save_predictor(vw &all, std::string reg_name)
void finish(vw &all, bool delete_all)
hash_func_t getHasher(const std::string &s)
example * alloc_examples(size_t, size_t count=1)
feature * get_features(vw &all, example *ec, size_t &feature_map_len)
primitive_feature_space * export_example(vw &all, example *ec, size_t &len)
example * import_example(vw &all, const std::string &label, primitive_feature_space *features, size_t len)
void start_parser(vw &all)
uint64_t hash_feature_cstr(vw &all, char *fstr, uint64_t u)
void add_label(example *ec, float label, float weight, float base)
float get_weight(vw &all, uint32_t index, uint32_t offset)
void init_features(primitive_feature_space &fs, size_t features_count)
void empty_example(vw &, example &ec)
unsigned char namespace_index
float get_initial(example *ec)
char ** to_argv_escaped(std::string const &s, int &argc)
v_array< float > & get_cost_sensitive_prediction_confidence_scores(example *ec)
size_t get_tag_length(example *ec)
void set_weight(vw &all, uint32_t index, uint32_t offset, float value)
void add_constant_feature(vw &vw, example *ec)
vw * initialize(options_i &options, io_buf *model, bool skipModelLoad, trace_message_t trace_listener, void *trace_context)
float get_prediction(example *ec)
void cmd_string_replace_value(std::stringstream *&ss, std::string flag_to_replace, std::string new_value)
void finish_example(vw &, example &)
float get_action_score(example *ec, size_t i)
size_t get_feature_number(example *ec)
std::vector< example * > multi_ex
vw * initialize_escaped(std::string const &s, io_buf *model, bool skipModelLoad, trace_message_t trace_listener, void *trace_context)
example * read_example(vw &all, char *example_line)
void(* trace_message_t)(void *context, const std::string &)
example * new_unused_example(vw &all)
float get_cost_sensitive_prediction(example *ec)
void move_feature_namespace(example *dst, example *src, namespace_index c)
uint64_t hash_feature(vw &all, const std::string &s, uint64_t u)
uint64_t hash_space(vw &all, const std::string &s)
uint64_t hash_space_static(const std::string &s, const std::string &hash)
uint32_t num_weights(vw &all)
float get_label(example *ec)
uint32_t * get_multilabel_predictions(example *ec, size_t &len)
float get_topic_prediction(example *ec, size_t i)
size_t get_action_score_length(example *ec)
void releaseFeatureSpace(primitive_feature_space *features, size_t len)
void setup_examples(vw &all, v_array< example *> &examples)