ENH: small optimization of the classification criterion