max-margin subgradient, cost functions, etc.