0

我想tune()e1071 中找到最佳内核列表c('linear', 'polynomial', 'radial basis', 'sigmoid')。怎么做?

我试过这样,但它不起作用:

svmtune <- tune(svm, y~., data=dat, tunecontrol=tune.control(kernel=c('linear', 'polynomial',
                                                                      'radial basis', 'sigmoid')))

Error in tune.control(kernel = c("linear", "polynomial", "radial basis",  :
   unused argument (kernel = c("linear", "polynomial", "radial basis", "sigmoid"))
4

1 回答 1

0

我找到了解决这个问题的方法:

svmtune <- tune(svm, y~., data=dat, cost=10, ranges=list(kernel=c("linear", "polynomial",
                                                                  "radial", "sigmoid")))
于 2020-05-02T05:53:19.007 回答