Classifying datasets with linear programming