【发布时间】:2015-12-28 09:29:06
【问题描述】:
我知道 e1071 包中的tune() 对于选择 SVM 回归的最佳参数很有用。但我只是不知道如何为 gamma、cost 等参数选择合适的范围和epsilon?
x<-tune.svm(rg~.,data=train,kernel="radial",
gamma = c(0.01,0.03,0.1,0.3,1.3,10,30),cost=2^(2:9),epsilon =c(0.01,0.03,0.1,0.3,1.3,10,30) )
上面的参数只是随机选择的。任何建议,将不胜感激。 非常感谢!!
好的。这是我在tune.svm 之后的训练数据结果,x 轴是拟合数据,y 轴是实际数据。有没有关于如何提高 SVM 性能的想法?
以及训练集中的数据:
> head(train)
rg weather sex member_type annual_income Weekend age_group
1 0.035725277 6 2 3 1 2 3
2 1.693898548 6 2 1 5 2 1
3 0.009012839 1 2 3 1 1 3
4 0.014902879 6 2 3 2 2 3
6 0.003531616 6 2 3 1 1 2
7 0.001575542 6 1 3 2 1 3
【问题讨论】:
标签: svm