详细日志缩写在 SVC、scikit-learn 中的含义 [英] Verbose log abbriviations meaning in SVC, scikit-learn

查看:112
本文介绍了详细日志缩写在 SVC、scikit-learn 中的含义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 scikit-learn 中寻找 SVC 函数的详细日志缩写的含义?

I am looking for the meaning of verbose log abbriviations of SVC function in scikit-learn?

如果nSV是支持向量数,#iter是迭代次数,nBSV, rho,obj是什么意思?

If nSV is the number of support vectors, #iter is the number of iteration, what dose nBSV, rho,obj mean?

这是一个例子:

import numpy as np
from sklearn.svm import SVR
sets=np.loadtxt('data\Exp Rot.txt')         # reading data
model=SVR(kernel='rbf',C=100,gamma=1,max_iter=100000,verbose=True)
model.fit(sets[:,:2],sets[:,2])
print(model.score)

这是结果

推荐答案

scikit-learn 正在使用 libsvm 支持向量机的实现(LinearSVC 将使用 liblinear 由相同的作者).官方网站有自己的常见问题解答,可以在这里回答这个问题.

scikit-learn is using libsvm's implementation of support-vector machines (LinearSVC will use liblinear by the same authors). The official website has it's own FAQ answering this here.

摘录:

Q:训练C-SVM的输出如下.它们是什么意思?

Q: The output of training C-SVM is like the following. What do they mean?

优化完成,#iter = 219

optimization finished, #iter = 219

nu = 0.431030

nu = 0.431030

obj = -100.877286,rho = 0.424632

obj = -100.877286, rho = 0.424632

nSV = 132,nBSV = 107

nSV = 132, nBSV = 107

总 nSV = 132

Total nSV = 132

obj 是对偶 SVM 问题的最优目标值

obj is the optimal objective value of the dual SVM problem

rho 是决策函数 sgn(w^Tx - rho) 中的偏差项

rho is the bias term in the decision function sgn(w^Tx - rho)

nSV 和 nBSV 是支持向量和有界支持向量的数量(即 alpha_i = C)

nSV and nBSV are number of support vectors and bounded support vectors (i.e., alpha_i = C)

nu-svm 是 C-SVM 的某种等效形式,其中 C 被 nu 替换

nu-svm is a somewhat equivalent form of C-SVM where C is replaced by nu

nu 只是显示相应的参数.更多细节在 libsvm 文档中

nu simply shows the corresponding parameter. More details are in libsvm document

上述 libsvm 文档的链接(PDF!)

这篇关于详细日志缩写在 SVC、scikit-learn 中的含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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