我正在使用本教程http://www.svm-tutorial.com/2014/10/support-vector-regression-r/探索支持向量机回归。我在使用网格搜索调整模型时遇到Error in do.call(method, c(list(train.x, data = data, subset = train.ind[[sample]]), : 'what' must be a function or character string
,但我不确定这意味着什么。以下是我使用的代码:
svm_m <- svm(FuelRate~ Heading+Distance+Elevatio+YieldDry+HarvestM, data = fr_tr)
tuneResult <- tune(svm_m, FuelRate ~ Heading+Distance+Elevatio+YieldDry+HarvestM, data = fr_tr, ranges = list(epsilon = seq(0,1,0.1), cost=2^(2:9)))
。任何人都可以教我解决方案吗?