[fix] labels in averaged perceptron trainer

This commit is contained in:
Al
2015-09-29 13:07:07 -04:00
parent 6666f0baf8
commit 8ca22247f9
2 changed files with 9 additions and 2 deletions

View File

@@ -48,6 +48,9 @@ typedef struct class_weight {
#define NULL_WEIGHT (class_weight_t){0.0, 0.0, 0}
#define SEPARATOR_LABEL "sep"
#define FIELD_SEPARATOR_LABEL "fsep"
KHASH_MAP_INIT_INT(class_weights, class_weight_t)
KHASH_MAP_INIT_INT(feature_class_weights, khash_t(class_weights) *)
@@ -57,6 +60,7 @@ typedef struct averaged_perceptron_trainer {
uint32_t num_classes;
uint64_t num_updates;
uint64_t num_errors;
uint32_t iterations;
khash_t(str_uint32) *features;
khash_t(str_uint32) *classes;
cstring_array *class_strings;