Update discriminant analysis code