SVM参数寻优:grid search

grid search和穷举法比较相似。就是找到全部的组合一一实验。cross validation就好比五层交叉验证,每次拿样本的1/5测试,其余都拿去训练。循环五次以后求平均值。bestcg就是经过grid search找到最小cross validation偏差的那一组cg.

使用svm,不管是libsvm仍是svmlight,都须要对参数进行设置。以RBF核为例,在《A Practical Guide to Support Vector Classi cation》一文中做者提到在RBF核中有2个参数:C和g。对于一个给定的问题,咱们事先不知道C和g取多少最优,所以咱们要进行模型选择(参数搜索)。这样作的目标是找到好的(C, g)参数对,使得分类器可以精确地预测未知的数据,好比测试集。须要注意的是在在训练集上追求高精确度多是没用的(意指泛化能力)。根据前一部分所说的,衡量泛化能力要用到交叉验证。
在文章中做者推荐使用“网格搜索”来寻找最优的C和g。所谓的网格搜索就是尝试各类可能的(C, g)对值,而后进行交叉验证,找出使交叉验证精确度最高的(C, g)对。“网格搜索”的方法很直观可是看起来有些原始。事实上有许多高级的算法,好比可使用一些近似算法或启发式的搜索来下降复杂度。可是咱们倾向于使用“网格搜索”这一简单的方法。算法

英语论文表达:app

To choose parameters of the model, this paper adopted the method of cross validation based on grid search, avoiding the arbitrary and capricious behav ide

To acquire accuracy and stability, we apply 10-fold cross validation and a grid-search technique to 测试

The selection of the kernel parameters in SVM is a long-standing question. Empirically, cross-validation with grid-search is the most popular method ui

Based on the validation set, the best pair of parameters is grid-searched in the range of [2 −2 ,2 2 ] and [θ 0 ,θ 1 ], respectively, for γ and θ.this

C and the kernel width parameter γ were optimized using a grid search approach.ci

相关文章
相关标签/搜索