How can I use tune function with support vector REGRESSION and not classification as when I tried to use "svr" as the first argument of the function it didn't work and I couldn't find a single example of tuning for regression. So this was the code I executed using e1071 package:
tuneSVR <- tune(svm,
train.x = train_[, -which(names(train) %in% c("Identifier", "Sales"))],
train.y = train$Sales,
data = train,
ranges = list(epsilon = seq(0,1,0.1), cost = 2^(seq(0.5,8,.5))))
Is it wrong because my problem is a regression one? and is it normal for these lines of code to take long hours to be executed? and how can I calculate R Squared for svr?