The motor cycle crash data, available as mcycle in the MASS package, is challenging to fit with regression because the response variable, acceleration, has a very dynamic fast-changing response to the Time variable. The data was collected in an experiment to measure rapid change in acceleration when a motor cycle crashes into another motor cycle.
Wavelet multiresolution analysis, discussed by several authors, provides one of the best methods for tracking the dynamic range, that is, the sharp peaks and trough.
ans <- tune(svm, accel~Time,
ranges=list(cost=c(0.001,0.01,0.1,1,5,10,100,1000,10^4)))
yHat <- predict(ans$best.model, Time)