Working codes for SVM and NB with cross validation