Added LDA, fixed some bugs, LDA from ecgs code