Max-Margin Invariant Features from Transformed Unlabelled Data