Predicting with a maximum categories limit in datasets