Discriminant principal components analysis