opencv - OpenCV 中的支持向量机 : how to handle unbalance data?

标签 opencv svm

例如我有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/

相关文章:

c++ - 如何在 opencv C++ 中合并重叠的矩形?

c++ - openCV 报错

c++ - 将扭曲/转换后的图像与基本图像匹配的最快、最准确的方法?

matlab - matlab 中的 svmtrain - 约束不够严格。

c++ - 在某些像素 openCV 上绘制矩形

c++ - 为什么 opencv 使用输出参数,而不是只返回输出?

java - LibSVM 和 Weka API 不能一起工作

opencv - 词袋训练样本

python - 选择离 SVM 超车道最近的 5 个数据点

machine-learning - Scikit-learn 标签编码后进行一种热编码,从而为训练数据集和测试数据集产生不同的特征集。如何解决这个问题?