Skip to content

Instantly share code, notes, and snippets.

@gavinmh
Created October 17, 2013 03:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gavinmh/7018756 to your computer and use it in GitHub Desktop.
Save gavinmh/7018756 to your computer and use it in GitHub Desktop.

Training Data

1 | kmeans process that
3 | the cat
2 | the nexus process that
1 | kmeans that
1 | kmeans process
2 | nexus process
2 | that nexus
3 | cat kmeans the
3 | cat

The first digit indicates the example's class. The example's features follow the pipe.

Test Data

'1 | kmeans that
'2 | the nexus process that
'3 | cat
'2 | the that
'1 | kmeans cat process
'1 | cat kmeans kmeans kmeans kmeans
'3 | nexus cat cat

The digit prepended with an apostrophe is a reference label. Here they indicate the correct class, and are used to quickly inspect the predictions. These reference labels are not used by Vowpal Wabbit for any other puporse.

Training a Model

./vw -d train --oaa 3 -f model

Making Predictions

./vw -t -i model -d test -p predictions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment