Mixture and flexible discriminant analysis