Supervised Machine Learning Under Constraints