Dealing with categorical data in collective anomalies