C是一个由用户去指定的系数,表示对分错的点加入多少的惩罚,当C很大的时候,分错的点就会更少,但是过拟合的情况可能会比较严重,当C很小的时候,分错的点可能会很多,不过可能由此得到的模型也会不太正确,所以如何选择C是有很多学问的,不过在大部分情况下就是通过经验尝试得到的。

Trade-off between Maximum Margin and Classification Errors

http://mi.eng.cam.ac.uk/~kkc21/thesis_main/node29.html

The trade-off between maximum margin and the classification error (during training) is defined by the value C in Eqn. . The value C is called the Error Penalty. A high error penalty will force the SVM training to avoid classification errors (Section  gives a brief overview of the significance of the value of C).

A larger C will result in a larger search space for the QP optimiser. This generally increases the duration of the QP search, as results in Table  show. Other experiments with larger numbers of data points (1200) fail to converge whenC is set higher than 1000. This is mainly due to numerical problems. The cost function of the QP does not decrease monotonically . A larger search space does contribute to these problems.

The number of SVs does not change significantly with different C value. A smaller C does cause the average number of SVs to increases slightly. This could be due to more support vectors being needed to compensate the bound on the other support vectors. The  norm of w decreases with smaller C. This is as expected, because if errors are allowed, then the training algorithm can find a separating plane with much larger margin. Figures  and  show the decision boundaries for two very different error penalties on two classifiers (2-to-rest and 5-to-rest). It is clear that with higher error penalty, the optimiser gives a boundary that classifies all the training points correctly. This can give very irregular boundaries.

One can easily conclude that the more regular boundaries (Figures  and ) will give better generalisation. This conclusion is also supported by the value of ||w|| which is lower for these two classifiers, i.e. they have larger margin. One can also use the expected error bound to predict the best error penalty setting. First the expected error bound is computed using Eqn.  and  (  ). This is shown in Figure . It predicts that the best setting isC=10 and C=100. The accuracy obtained from testing data (Figure ) agrees with this prediction.

所以c一般 选用10,100

实测:

用svm_rank测试数据时,

经验参数,c=1,效果不如c=3.
故c=1,放弃。

但c=1 训练时间比c=3训练时间短。

总的来说,c越大,svm_rank learn的迭代次数越大,所耗训练时间越长。

svmrank 的误差惩罚因子c选择 经验的更多相关文章

  1. SVM学习(续)核函数 & 松弛变量和惩罚因子

    SVM的文章可以看:http://www.cnblogs.com/charlesblc/p/6193867.html 有写的最好的文章来自:http://www.blogjava.net/zhenan ...

  2. 惩罚因子(penalty term)与损失函数(loss function)

    penalty term 和 loss function 看起来很相似,但其实二者完全不同. 惩罚因子: penalty term的作用是把受限优化问题转化为非受限优化问题. 比如我们要优化: min ...

  3. Relation Extraction中SVM分类样例unbalance data问题解决 -松弛变量与惩罚因子

    转载自:http://blog.csdn.net/yangliuy/article/details/8152390 1.问题描述 做关系抽取就是要从产品评论中抽取出描述产品特征项的target短语以及 ...

  4. SVM学习(五):松弛变量与惩罚因子

    https://blog.csdn.net/qll125596718/article/details/6910921 1.松弛变量 现在我们已经把一个本来线性不可分的文本分类问题,通过映射到高维空间而 ...

  5. 学习ARM7、ARM9的操作系统选择经验! [转]

    一 首先说说ARM的发展        可以用一片大好来形容,翻开各个公司的网站,招聘里面嵌入式占据了大半工程师职位.广义的嵌入式无非几种:传统的什么51.AVR.PIC称做嵌入式微控制器:ARM是嵌 ...

  6. (六)6.4 Neurons Networks Autoencoders and Sparsity

    BP算法是适合监督学习的,因为要计算损失函数,计算时y值又是必不可少的,现在假设有一系列的无标签train data:  ,其中 ,autoencoders是一种无监督学习算法,它使用了本身作为标签以 ...

  7. CS229 6.4 Neurons Networks Autoencoders and Sparsity

    BP算法是适合监督学习的,因为要计算损失函数,计算时y值又是必不可少的,现在假设有一系列的无标签train data:  ,其中 ,autoencoders是一种无监督学习算法,它使用了本身作为标签以 ...

  8. 支持向量机SVM 参数选择

    http://ju.outofmemory.cn/entry/119152 http://www.cnblogs.com/zhizhan/p/4412343.html 支持向量机SVM是从线性可分情况 ...

  9. libSVM 参数选择

    libSVM 参数选择  [预测标签,准确率,决策值]=svmpredict(测试标签,测试数据,训练的模型);    原文参考:http://blog.csdn.net/carson2005/art ...

随机推荐

  1. Python学习过程笔记整理(三)

    函数 -函数使用 -函数需要先定义,定义不会执行函数 -使用函数,俗称调用 -定义函数 -格式:def 函数名称(参数=默认值):,函数名称不能用大驼峰,参数可以没有 -调用函数 -格式:函数名(参数 ...

  2. 报错:Cannot create PoolableConnectionFactory (The server time zone value 'CST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverT

    报错:Cannot create PoolableConnectionFactory (The server time zone value 'CST' is unrecognized or repr ...

  3. Unity中使用C#实现UDP广播

    没有系统的学习过网络,想做联机游戏还真是费劲,想做在局域网内实现自动搜索服务器的功能,然后就想到了使用UDP进行广播,把服务器的信息广播给每一个玩家. Socket udpSocket = new S ...

  4. netsh常用命令

    netsh常用命令 0.netsh介绍 netsh(Network Shell)是一个windows系统本身提供的功能强大的网络配置命令行工具 1.修改IP地址addr和子网掩码mask netsh ...

  5. Oracle之带参存储过程(存储过程中for循环调用存储过程)

    --带参存储过程create or replace procedure testdate(v in number) is i number; begin i:=v; insert into test_ ...

  6. Streamr助你掌控自己的数据(2)——三种整合数据至Streamr的典型场景

    博客说明 所有刊发内容均可转载但是需要注明出处. 三种整合数据至Streamr的典型场景 本系列文档主要介绍怎么通过Streamr管理自己的DATA,整个系列包括三篇教程文档,分别是:教你5分钟上传数 ...

  7. 《The Mythical Man-Month(人月神话)》读后感(2)

    第10章 未雨绸缪 在化学领域中,在实验室可以进行的反应过程,并不能在工厂中一步实现.一个被称为“ 实验性工厂(pilot planet)”的中间步骤是非常必要的,它会为提高产量和在缺乏保护的环境下运 ...

  8. 在虚拟机上搭建物理机可访问的web服务(IIS)

    0x0 前言 安装webug4.0的时候突发奇想,想学下如何在虚拟机里搭建网站,然后让主机像访问互联网的网站一样访问虚拟机的网站,为以后渗透测试搭建环境做准备 0x1 虚拟机安装win2003[以防万 ...

  9. i++ i+=1 i=i+1 汇编代码效率比较

    结论:一样.编译器和编译器之间可能有点区别但是程序不会变. 0x00 一直不清楚到底是因为懒还是真的为了效率,要把" i = i + 1 "写成" i++ "或 ...

  10. python基础网络编程--转

    python之网络编程 本地的进程间通信(IPC)有很多种方式,但可以总结为下面4类: 消息传递(管道.FIFO.消息队列) 同步(互斥量.条件变量.读写锁.文件和写记录锁.信号量) 共享内存(匿名的 ...