如何调整SVM Rank的参数?

钻头机械手

我正在使用SVM Rank,它具有多个参数,更改了我得到各种结果的人。是否有某种机制可以根据验证集上的最佳结果进行调整并获得最佳参数?

以下是不同的参数:

Learning Options:
     -c float    -> C: trade-off between training error
                    and margin (default 0.01)
     -p [1,2]    -> L-norm to use for slack variables. Use 1 for L1-norm,
                    use 2 for squared slacks. (default 1)
     -o [1,2]    -> Rescaling method to use for loss.
                    1: slack rescaling
                    2: margin rescaling
                    (default 2)
     -l [0..]    -> Loss function to use.
                    0: zero/one loss
                    ?: see below in application specific options
                    (default 1)
Optimization Options (see [2][5]):
     -w [0,..,9] -> choice of structural learning algorithm (default 3):
                    0: n-slack algorithm described in [2]
                    1: n-slack algorithm with shrinking heuristic
                    2: 1-slack algorithm (primal) described in [5]
                    3: 1-slack algorithm (dual) described in [5]
                    4: 1-slack algorithm (dual) with constraint cache [5]
                    9: custom algorithm in svm_struct_learn_custom.c
     -e float    -> epsilon: allow that tolerance for termination
                    criterion (default 0.001000)
     -k [1..]    -> number of new constraints to accumulate before
                    recomputing the QP solution (default 100)
                    (-w 0 and 1 only)
     -f [5..]    -> number of constraints to cache for each example
                    (default 5) (used with -w 4)
     -b [1..100] -> percentage of training set for which to refresh cache
                    when no epsilon violated constraint can be constructed
                    from current cache (default 100%) (used with -w 4)
SVM-light Options for Solving QP Subproblems (see [3]):
     -n [2..q]   -> number of new variables entering the working set
                    in each svm-light iteration (default n = q).
                    Set n < q to prevent zig-zagging.
     -m [5..]    -> size of svm-light cache for kernel evaluations in MB
                    (default 40) (used only for -w 1 with kernels)
     -h [5..]    -> number of svm-light iterations a variable needs to be
                    optimal before considered for shrinking (default 100)
     -# int      -> terminate svm-light QP subproblem optimization, if no
                    progress after this number of iterations.
                    (default 100000)
Kernel Options:
     -t int      -> type of kernel function:
                    0: linear (default)
                    1: polynomial (s a*b+c)^d
                    2: radial basis function exp(-gamma ||a-b||^2)
                    3: sigmoid tanh(s a*b + c)
                    4: user defined kernel from kernel.h
     -d int      -> parameter d in polynomial kernel
     -g float    -> parameter gamma in rbf kernel
     -s float    -> parameter s in sigmoid/poly kernel
     -r float    -> parameter c in sigmoid/poly kernel
     -u string   -> parameter of user defined kernel
伊夫拉德

这就是所谓的网格搜索我不知道您是否熟悉python和scikit-learn,但是无论哪种方式,我都认为它们的描述和示例非常好,并且与语言无关。

基本上,您可以为每个参数(或从中抽取随机样本的间隔,请参阅随机搜索)指定感兴趣的值,然后针对设置的每种组合,使用交叉验证(通常是k折交叉验证)来计算模型在这些设置下的表现。返回性能最佳的组合(scikit-learn实际上可以返回组合的排名)。

请注意,这可能需要很长时间。根据您的问题,您应该自己确定一些参数。例如,对于文本分类,您应该只选择线性核,对于您可能会想要的其他问题,rbf等等。不要只是在网格搜索中投入所有精力,而是要使用算法知识来确定尽可能多的参数。和眼前的问题。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

训练svm模型时如何调整参数

来自分类Dev

调整参数SVM

来自分类Dev

SVM参数调整

来自分类Dev

调整参数SVM

来自分类Dev

在R(线性SVM内核)中调整svm参数

来自分类Dev

如何调整RewriteRule的参数?

来自分类Dev

如何调整backgroundSubtractorMOG的参数

来自分类Dev

如何为SVM回归选择最佳参数?

来自分类Dev

如何调整最大熵的参数?

来自分类Dev

R:调整SVM参数-{e1071}包中的class.weights

来自分类Dev

调整参数时,在交叉验证的SVM中识别过度拟合

来自分类Dev

在mlr3中使用classif.svm调整参数时出错

来自分类Dev

插入符-使用plot.train时缩放SVM调整参数t(Sigma)

来自分类Dev

如何使用FTS4修复SQLite Android上的错误“函数rank()的参数个数错误”?

来自分类Dev

如何使用Caret包调整多个参数?

来自分类Dev

如何使用验证数据调整超参数

来自分类Dev

如何使用for循环调整进入层的参数?

来自分类Dev

如何为SVM线性内核类型选择最佳参数

来自分类Dev

如何使用Scikit Learn在Random Forest中调整参数?

来自分类Dev

如何通过超参数调整来改善此模型

来自分类Dev

如何通过使用gekko调整参数来解决过冲?

来自分类Dev

iBeacon:了解如何使用参数调整信标电池

来自分类Dev

如何调整 Matplotlib.Axes.scatter 方法中的“c”参数?

来自分类Dev

如何在plot.stanfit() 中调整参数标签?

来自分类Dev

svm 超参数调整:使用 e1071 tune.control 进行随机搜索。random != NULL 在外部函数调用中给出 NA/NaN/Inf (arg 10)

来自分类Dev

在sklearn中学习SVM之后如何使用dual_coef_参数?

来自分类Dev

如何在 svm(scikit) 中提取和转移学习到的参数?

来自分类Dev

OpenCV无法设置SVM参数

来自分类Dev

调整GC(CMS)的参数

Related 相关文章

热门标签

归档