Teaching the old dog new tricks: Supervised learning with constraints