I'm trying to tune hyperparameters epsilon and cost using the tune function in e1071, but I keep getting this error whenever I try to expand the ranges of values that I want to test:
"Error in predict.svm(ret, xhold, decision.values = TRUE) : Model is empty!"
I'm dealing with the regression application, not a classification one, and the data I'm using is for density profiles, where "x" describes the position alongside a board and "y corresponds to the value of the density measured. This is the code I'm using:
model <- tune(svm, y~x, data = profiles, ranges = list(cost = 2^(0:10), epsilon = 10^(-10:0), tunecontrol = tune.control(cross = 5))
The data is all numeric (doubles) and the problem seems to occur only when I try to test such a large range of values. Has anybody experienced a similar issue?
It may be the range of your cost and epsilon values. I ran into the same problem, i.e. svm regression with all numeric data. I was tuning using a range of epsilon values from .1 to 10 and I was getting the model empty error. I then reduced the epsilon range from .1 to 1 and it was able to converge with no errors. There is probably some interaction between cost and epsilon that generates unstable predictions, i.e. high cost and high epsilon are not kosher.