0

This link says that currently all feature labels must be followed by a float. But when I enter -1 3 |context day:Monday in this validator, it accepts it as day as a feature with value Monday.

Further, If I can provide strings as values to a feature, how can I provide values which contain spaces. For example -1 3 |context day:Monday name:A B keeps only A as the value to the label name, and treats B as another label. But, in actual, I want to assign the label name the value "A B"

pasternak
  • 361
  • 4
  • 14
  • Check [this answer](http://stackoverflow.com/a/28643968/1296044) for how to represent various types of features (numerical, categorical, binary) in `vw` – arielf May 10 '17 at 07:58

1 Answers1

1

all feature labels must be followed by a float

Yes, but if no colon and float is provided, the default feature value is 1.0.

But when I enter -1 3 |context day:Monday in this validator, it accepts The validator is just approximate and not kept update for several years. I am not aware of any VW base learner that would allow non-float feature values.

A solution to your problem is to escape spaces in your categorical feature values with spaces and convert a categorical feature with N values into N binary features (in the end it's the same). For example: -1 3 |context day_Monday name_A_B

Martin Popel
  • 2,671
  • 12
  • 22