imodel <- ksvm(group~.,
data=input)
predicted <- predict(imodel,newdata = input,type="response")
error_rate <- ModelMetrics::ce(input$group,predicted)
svm_grid <- expand.grid(sigma=2^(-10:4),C=-5:20)
set.seed(2012)
imodel <- train(group~.,data = input,
method ="svmRadial",
preProc=c("center","scale"),tuneGrid =svm_grid )
imodel$bestTune