例如我有2个类的分类问题,但数据是倾斜的(不同类的数据样本比例为1:10)
如何使用 SVM 处理不平衡数据?
我没有找到不同类别权重的参数(OpenCV seems have no parameters for this?)
最佳答案
它在 CvSVMParams::CvSVMParams
中有 class_weights
参数.
class_weights – Optional weights in the C_SVC problem , assigned to particular classes. They are multiplied by C so the parameter C of class #i becomes class_weights_i * C. Thus these weights affect the misclassification penalty for different classes. The larger weight, the larger penalty on misclassification of data from the corresponding class.
关于opencv - OpenCV 中的支持向量机 : how to handle unbalance data?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31674974/