svm scikit中的class weight = none和auto之间有什么区别 [英] what is the difference between class weight = none and auto in svm scikit learn
本文介绍了svm scikit中的class weight = none和auto之间有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在scikit中学习svm分类器,class_weight = None和class_weight = Auto之间有什么区别.
In scikit learn svm classifier what is the difference between class_weight = None and class_weight = Auto.
在文档中以
对于SVC,将类i的参数C设置为class_weight [i] * C.如果未给出,则所有类均应具有权重一. 自动"模式使用y的值来自动调整与班级频率成反比的权重.
Set the parameter C of class i to class_weight[i]*C for SVC. If not given, all classes are supposed to have weight one. The ‘auto’ mode uses the values of y to automatically adjust weights inversely proportional to class frequencies.
class sklearn.svm.SVC(C=1.0, kernel='rbf', degree=3, gamma=0.0, coef0=0.0, shrinking=True, probability=False, tol=0.001, cache_size=200, class_weight=None, verbose=False, max_iter=-1, random_state=None)
但是使用自动模式的好处是什么.我不明白它的实现.
But what is the advantage of using auto mode. I couldnt understand its implementation.
推荐答案
查看全文