如何通过 svmlight 中可用的不平衡训练数据集提供平衡训练的成本?

How to provide cost for balancing training by imbalanced train dataset as available in svmlight?

e1071 的 SVM 中的成本似乎与 svmlight 的成本不同。 e1071 库的手册对其成本参数的定义如下:

cost of constraints violation (default: 1)—it is the ‘C’-constant of the regular-
ization term in the Lagrange formulation

这基本上是误分类的容许度。 svmlight 提供了一种权重,在其手册中描述为:

Cost: cost-factor, by which training errors on
      positive examples outweight errors on negative
      examples (default 1)

这个成本基本上是为了在火车数据没有相同数量的正负数据点的情况下允许平衡。 e1071的SVM实现有没有类似的东西?

您可能想查看参数:class.weights(在帮助页面上有解释)。

最佳 大卫