Domanda

Is there a way of specifying multiple labels for an example in the Vowpal Wabbit data format?

I tried comma's and it doesn't complain, but I am not sure if it does what I expect...

So e.g:

2,3 | f1:3 f3:23 
2 | f1:2 f3:34

The first line is an example that is both in class 2 and in class 3.

I do see some discussion on the vowpal mailing list but I am not sure if anything has happened since.

Tom

È stato utile?

Soluzione

It looks like you should use CSOAA which allows multiple labels. They need to be natural numbers and less than or equal to K where K is the number of classes. Like this:

1 2 3 class1 | f1:2 f2:3
4 2 5 class2 | f3:7 f5:3
2 3 class3 | f4:2 f2:2

For more detail, see the Vowpal Wabbit documentation: https://github.com/JohnLangford/vowpal_wabbit/wiki/Cost-Sensitive-One-Against-All-%28csoaa%29-multi-class-example

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top