compute the lda