diff options
author | John Langford <jl@hunch.net> | 2014-04-29 18:43:31 +0400 |
---|---|---|
committer | John Langford <jl@hunch.net> | 2014-04-29 18:43:31 +0400 |
commit | c70c6d368f04efbbca8b82335c3076207ab7538b (patch) | |
tree | 568e5df8ff922dc4cbf2ec3b9086d37a941d3a78 /vowpalwabbit/cbify.cc | |
parent | 653bc3458863bb18f695b7995f4f175944f23421 (diff) |
redefining class
Diffstat (limited to 'vowpalwabbit/cbify.cc')
-rw-r--r-- | vowpalwabbit/cbify.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vowpalwabbit/cbify.cc b/vowpalwabbit/cbify.cc index 2f9d4e6f..2543fd97 100644 --- a/vowpalwabbit/cbify.cc +++ b/vowpalwabbit/cbify.cc @@ -192,7 +192,7 @@ namespace CBIFY { //get cost prediction for this label wc.x = CB_ALGS::get_cost_pred<false>(all, &known_cost, ec, label, all.sd->k); - wc.weight_index = label; + wc.class_index = label; wc.partial_prediction = 0.; wc.wap_value = 0.; @@ -220,7 +220,7 @@ namespace CBIFY { //get cost prediction for this label wc.x = FLT_MAX; - wc.weight_index = j+1; + wc.class_index = j+1; wc.partial_prediction = 0.; wc.wap_value = 0.; data.cs_label.costs.push_back(wc); @@ -274,7 +274,7 @@ namespace CBIFY { for (uint32_t j = 0; j < data.k; j++) { float pseudo_cost = data.cs_label.costs[j].x - data.epsilon * min_prob / (max(data.count[j], min_prob) / norm) + 1; - data.second_cs_label.costs[j].weight_index = j+1; + data.second_cs_label.costs[j].class_index = j+1; data.second_cs_label.costs[j].x = pseudo_cost; } if (i != 0) |