The following code is executed to find the best model after performing tuning using cross-validation. But the model is still running even after 48 hours. is there any problem with the code. The data used in the model is having 62000 cases.
tuneGrid <- expand.grid(
cost = c(0.1, 1, 10),
gamma = c(0.01, 0.1, 1)
)
# Perform tuning using cross-validation
set.seed(123)
tuneResult <- tune(
svm,
test_result ~ .,
data = trainDataFull,
kernel = "radial",
ranges = list(cost = tuneGrid$cost, gamma = tuneGrid$gamma),
class.weights = class_weights,
probability = TRUE
)
# Best parameters
bestModel <- tuneResult$best.model
print(bestModel)