Svm_train is a function to trains a batch of samples using the support vector machine model and outputs a weight vecotor for classification. This function used the Stochastic Gradient Descent (SGD) method to get convergence.