Implement SVM and LDA.