//Register kernel function
KernelManager.setCustomKernel(new LinearKernel());
//Setup parameters
svm_parameter param = new svm_parameter();
//Train the model
System.out.println("Training started...");
svm_model model = SVMTrainer.train(trainingInstances, param);
System.out.println("Training completed.");