摘自:https://blog.csdn.net/szlcw1/article/details/52336824

本身这个函数也是基于libsvm实现的,所以在参数设置上有很多相似的地方。(PS: libsvm中的二次规划问题的解决算法是SMO)。
sklearn.svm.SVC(C=1.0, kernel='rbf', degree=3, gamma='auto', coef0=0.0, shrinking=True, probability=False,

tol=0.001, cache_size=200, class_weight=None, verbose=False, max_iter=-1, decision_function_shape=None,random_state=None)

参数:

l  C:C-SVC的惩罚参数C?默认值是1.0

C越大,相当于惩罚松弛变量,希望松弛变量接近0,即对误分类的惩罚增大,趋向于对训练集全分对的情况,这样对训练集测试时准确率很高,但泛化能力弱。C值小,对误分类的惩罚减小,允许容错,将他们当成噪声点,泛化能力较强。

l  kernel :核函数,默认是rbf,可以是‘linear’, ‘poly’, ‘rbf’, ‘sigmoid’, ‘precomputed’

  0 – 线性:u'v

   1 – 多项式:(gamma*u'*v + coef0)^degree

  2 – RBF函数:exp(-gamma|u-v|^2)

  3 –sigmoid:tanh(gamma*u'*v + coef0)

l  degree :多项式poly函数的维度,默认是3,选择其他核函数时会被忽略。

l  gamma : ‘rbf’,‘poly’ 和‘sigmoid’的核函数参数。默认是’auto’,则会选择1/n_features

l  coef0 :核函数的常数项。对于‘poly’和 ‘sigmoid’有用。

l  probability :是否采用概率估计?.默认为False

l  shrinking :是否采用shrinking heuristic方法,默认为true

l  tol :停止训练的误差值大小,默认为1e-3

l  cache_size :核函数cache缓存大小,默认为200

l  class_weight :类别的权重,字典形式传递。设置第几类的参数C为weight*C(C-SVC中的C)

l  verbose :允许冗余输出?

l  max_iter :最大迭代次数。-1为无限制。

l  decision_function_shape :‘ovo’, ‘ovr’ or None, default=None3

l  random_state :数据洗牌时的种子值,int值

主要调节的参数有:C、kernel、degree、gamma、coef0。

最新文章

  1. 【HDU 3037】Saving Beans Lucas定理模板
  2. 对Raphael画图标的一个jquery简单封装
  3. windows API 创建临时文件
  4. UE4 WCF RestFul 服务器 读取JSON 数据并解析 简单实例
  5. PHP 基本语法,字符串处理,正则
  6. 手机端touchstart,touchmove,touchend事件,优化用户划入某个可以点击LI的效果
  7. github 有名的问题【ERROR: Permission to .git denied to user】
  8. JqGrid TreeView使用
  9. JavaScript Application Architecture On The Road To 2015
  10. HttpStatusCode 枚举
  11. android入门——Service
  12. MVC数组模型绑定
  13. APUE-文件和目录(四)文件系统
  14. VueJs(12)---vue-router(导航守卫,路由元信息)
  15. javascript 之 面向对象【理解对象】
  16. Eliminate the Conflict HDU - 4115(2-sat 建图 hhh)
  17. AE缺失Form Trapcode Form
  18. 从SDP中至少要看到那些东西?
  19. undefined is not an object (evaluating '_react2.PropTypes.string')
  20. MySQL下concat函数中null值问题

热门文章

  1. 1008 Envy(好题¥)
  2. Ceph中的序列化
  3. c++primer 第四章编程练习答案
  4. python--pycharm汉化
  5. Linux-压缩与解压缩命令
  6. model1 就是jsp+javabean
  7. Android Volley完全解析(三),定制自己的Request
  8. NOIP模拟题 栅栏
  9. Python 2.7_多进程获取简书专题数据(一)
  10. MySQL_截止昨日南京市所有在职业务员业绩排名-20170116