JohnLangford/vowpal_wabbit — pull request #146 by akhudek (2013-08-30 21:38:59+00:00)
Title: Searn example weighting and library interface

Hi John,

The two changes here are:

1) Example weights influence the costs in the searn sequence loss function.

2) The learn function now works through the library interface.

For (2), I've tested this using the C interface. There are two main differences in the use of searn via the library compared to other methods. First, since searn calls finish_example itself library clients should not call finish_example. Second, the labeling results are copied into the example score fields *after* each sequence is consumed and processed.

I've only tested this with a ring_size that is larger than the biggest sequence. It's not entirely clear to me when VW deallocates example memory and I worry that the strategy I used to return labels might not work for sequences longer than the ring size.

Alex