代码之家  ›  专栏  ›  技术社区  ›  tenos

训练支持向量机模型时如何调整参数

  •  1
  • tenos  · 技术社区  · 12 年前

    如果我使用 rbf 作为内核函数,则两个参数( c g )必须进行调整。我可以搜索每个参数对( ci , gi ),然后选择最佳配对。有没有更好的方法来找到最佳参数。

    1 回复  |  直到 12 年前
        1
  •  3
  •   Community Mohan Dere    9 年前

    这里的亮点 blog on the kernel width choice :

    enter image description here

    To pick, say 1000 pairs (x,x’) at random from your dataset, compute the distance
    of all such pairs and take the median, the 0.1 and the 0.9 quantile. Now pick λ 
    to be the inverse any of these three numbers. With a little bit of cross 
    validation you will figure out which one of the three is best. In most cases you 
    won’t need to search any further.
    

    this post 通过交叉验证,分析了这种方法有效的原因。基本上避免了为所有数据点或仅为一个数据点更改决策函数。

    此外,您可以在SVM中搜索关于参数选择的“启发式方法”。例如,在 M.Boardman et al's A Heuristic for Free Parameter Optimization with Support Vector Machines ,作者应用 simulated annealing 以与穷举网格搜索相比提高参数搜索效率。