문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top