hacking fw ssvm code from pystruct
implement TRW class with memoization
use python logger; save train & test scores per iteration