Added cross validation to determine SVM C and kernel gamma parameters.