vowpal_wabbit icon indicating copy to clipboard operation
vowpal_wabbit copied to clipboard

Standardize contextual bandit action id index to be 0-based instead of 1-based

Open jackgerrits opened this issue 6 years ago • 2 comments
trafficstars

Currently, for contextual bandit action scores the index is 1-based. Elsewhere in VW all indices are 0-based. This should be standardized to 0-based as this is confusing to users and maintainers. This is a breaking change though, so the major version will need to be updated and communicated to users.

jackgerrits avatar Apr 11 '19 15:04 jackgerrits

@jackgerrits what exactly do you mean when you say "elsewhere in vw all indices are 0 based" ? In all multi-class algos (several of them) class-id have always been 1 .. k. Thanks.

arielf avatar Apr 13 '19 20:04 arielf

I think this is to do with overloading of class-id and action index in the CB stack. Since class-id is an internal implementation detail, in some sense, of CB, exposing it is unintutitive. See #1482

It might be worthwhile combining these into a single issue, since fixing it to be consistent across the different interfaces is likely to be a breaking change.

lokitoth avatar Apr 25 '19 18:04 lokitoth