Update linear discriminant analysis code