RBF内核的最佳西格玛? [英] Optimal sigma for the RBF kernel?

查看:83
本文介绍了RBF内核的最佳西格玛?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为 RBF 内核选择最佳 sigma?

How can I choose an optimal sigma for the RBF kernel?

我使用的是单个类的分类器,以什么为基础,采用什么参数

I'm using a classifier of a single class, on which to base, what parameters to take

推荐答案

我建议你使用某种网格搜索.这是一种同时评估两个参数性能的技术.对于您的 SVM,有 sigmaC.因此,您对参数空间执行详尽搜索,其中每个轴代表一个参数,其中的一个点是两个参数值的元组 (C_i, sigma_i).

I'd suggest you to use some sort of Grid-Search. It's a technique where you evaluate the performance of the two parameters at once. For your SVM there is sigma and C. Hence, you perform an exhaustive search over the parameter space where each axis represents an parameter and a point in it, is a tuple of two parameter values (C_i, sigma_i).

因此,要执行它,您只需为 C 选择一组:{C_1,..., C_n}sigma: {sigma_1,..., sigma_n} 并训练,然后针对两组 (C_i, sigma_i) 中的每对参数测试它.

So, to perform it, you simply choose a set for C: {C_1,..., C_n} and for sigma: {sigma_1,..., sigma_n} and train and afterwards test it for every pair of parameters in the two sets (C_i, sigma_i).

这实际上需要很长时间,所以我建议您尝试类似的方法:

This actually will take quite a long time so I suggest you to try something similar instead:

LibSVM 例如提供 K-Fold Cross-Validation,所以图片一组sigma 值,定义一个固定的 K(可能是 5 到 10)并运行交叉验证以获得对 C 的良好估计.记录 C 参数和准确度分数.将此应用于 sigma 值集的所有元素后,选择在每个交叉验证过程中实现最高准确度的参数对.

LibSVM for example offers K-Fold Cross-Validation, so pic a set of sigma values, define a fixed K (maybe 5 to 10) and run cross-validation to get a good estimate of C. Document the C parameter and the accuracy score. After you applied this to all elements of you set of sigma values, choose the pair of parameters which achived the highest accuracy during each cross-validation procedure.

注意:我建议你不要使用 SVM 来解决一类问题.即使有正式的定义,基本的 SVM 算法也需要两个类来确定最佳边界.因此,我建议您创建一个 catch-all 类并将您的一类问题转化为二类问题.

Note: I suggest you not to use the SVM to one-class problems. Even when there is a formal definition for it, the basic SVM algorithm needs two classes to determine an optimal boundary. Hence, I'd suggest you to create a catch-all class and to transform your one-class problem into a two-class problem.

这篇关于RBF内核的最佳西格玛?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆