Vowpal Wabbit Training and Test Formats

I try to use Vowpal Wabbit and in the process of figuring out the file formats needed for training and testing. I am following the tutorial from https://github.com/JohnLangford/vowpal_wabbit/wiki/Tutorial and see that the following training data format:

0 | price:.23 sqft:.25 age:.05 2006 1 2 'second_house | price:.18 sqft:.15 age:.35 1976 0 1 0.5 'third_house | price:.53 sqft:.32 age:.87 1924 

For test data, I have no shortcuts or any outputs, but only functions. How do I write this? I tried just to enable such functions:

 price:.23 sqft:.25 age:.05 2006 price:.18 sqft:.15 age:.35 1976 price:.53 sqft:.32 age:.87 1924 

But that gives me exceptions as this is not the correct format. I also tried the following, and all give me only 0 results:

 | price:.23 sqft:.25 age:.05 2006 | price:.18 sqft:.15 age:.35 1976 | price:.53 sqft:.32 age:.87 1924 0 0 0 | price:.23 sqft:.25 age:.05 2006 0 0 0 | price:.18 sqft:.15 age:.35 1976 0 0 0 | price:.53 sqft:.32 age:.87 1924 

In what format should I aim, knowing only the functions? Thanks for the help.

+5
source share
1 answer

The bar symbol (|) must also be in the prediction format:

 | price:.23 sqft:.25 age:.05 2006 | price:.18 sqft:.15 age:.35 1976 | price:.53 sqft:.32 age:.87 1924 

If you did not specify the correct labels, vw cannot, of course, calculate the loss of the test. For forecasts, use vw -d test_set.vw -t -p predictions.txt . The training set in the textbook (with only three examples) is too small to train any reasonable model.

+6
source

Source: https://habr.com/ru/post/1206926/


All Articles