9 size_t num = *(
size_t*)c;
12 size_t total =
sizeof(uint32_t) * num;
13 if (cache.
buf_read(c, (
int)total) < total)
15 std::cout <<
"error in demarshal of cost data" << std::endl;
18 for (
size_t i = 0; i < num; i++)
20 uint32_t temp = *(uint32_t*)c;
21 c +=
sizeof(uint32_t);
33 size_t total =
sizeof(size_t);
34 if (cache.
buf_read(c, (
int)total) < total)
47 for (
unsigned int i = 0; i < ld->
label_v.
size(); i++)
50 c +=
sizeof(uint32_t);
112 std::cerr <<
"example with an odd label, what is ";
113 for (
size_t i = 0; i < words.
size(); i++) std::cerr << words[i].begin <<
" ";
114 std::cerr << std::endl;
125 std::stringstream label_string;
127 label_string <<
" unknown";
131 std::stringstream pred_string;
151 uint32_t preds_index = 0;
152 uint32_t given_index = 0;
181 std::stringstream ss;
void print_update(vw &all, bool is_test, example &ec)
size_t read_cached_label(shared_data *, void *v, io_buf &cache)
void output_example(vw &all, example &ec)
void copy_array(v_array< T > &dst, const v_array< T > &src)
v_array< int > final_prediction_sink
void copy_label(void *dst, void *src)
float loss(cbify &data, uint32_t label, uint32_t final_prediction)
char * bufread_label(labels *ld, char *c, io_buf &cache)
v_array< substring > parse_name
void parse_label(parser *p, shared_data *, void *v, v_array< substring > &words)
void push_back(const T &new_ele)
void tokenize(char delim, substring s, ContainerT &ret, bool allow_empty=false)
void print_update(bool holdout_set_off, size_t current_pass, float label, float prediction, size_t num_features, bool progress_add, float progress_arg)
void default_label(void *v)
void(* print_text)(int, std::string, v_array< char >)
void cache_label(void *v, io_buf &cache)
void update(bool test_example, bool labeled_example, float loss, float weight, size_t num_features)
void buf_write(char *&pointer, size_t n)
MULTILABEL::labels multilabels
MULTILABEL::labels multilabels
v_array< uint32_t > label_v
char * bufcache_label(labels *ld, char *c)
double weighted_examples()
void delete_label(void *v)
size_t buf_read(char *&pointer, size_t n)