【发布时间】:2018-06-15 12:13:10
【问题描述】:
我不明白为什么当我运行 tune.svm 然后我运行摘要时,我只有这个结果:
使用 10 倍交叉验证对“svm”的误差估计:0.01385764,而我也期望最佳参数等。
我试过这个:
tuned <- tune.svm(y~.,
data = training,
gamma = 10^-2, cost = 10^2,
tunecontrol = tune.control(cross = 10))
summary(tuned)
#> Error estimation of ‘svm’ using 10-fold cross validation: 0.01385764
还有这个:
set.seed(222)
tunesvm <- tune(svm, y ~ ., data = training, kernel = "sigmoid",
ranges = list(cost = 0.001)
plot(tunesvm)
summary(tunesvm)
#> Error estimation of ‘svm’ using 10-fold cross validation: 0.01788785
【问题讨论】:
-
这决不能回答问题,但它是“支持向量机”而不是超级向量机。虽然我可能会用它作为歌曲名称:-)
-
1.
tune.svm在什么包中?如果您在问题中包含library语句,将会有所帮助。 . 2.你试过str(tuned)吗? -
图书馆(e1071)@G5W
标签: r machine-learning classification svm