R - Support Vector Machines-Linear Model With Tuning
SVM-Linear Training Model With Tuning
set.seed(1000)
start_time <- Sys.time() # Start timer
# tuneGrid = svmLinearGrid
svmLinearGrid <- expand.grid(C = c(2^(2), 2^(8), 2))
# Create model, 10X fold CV repeated 5X
tcontrol <- trainControl(method = "repeatedcv",
number = 10,
repeats = 5,
savePredictions = "final") # Saves predictions
lin_model_obj <- train(Class ~ .,
data = training_set,
method = "svmLinear",
trControl = tcontrol,
tuneGrid = svmLinearGrid)
Sys.time() - start_time # End & Display time
SVM-Linear Model Summary¶
lin_model_obj
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.