Robust classification with categorical variables