在 scikit-learn 中使用 OneVsRest 分类时,每个分类器的负数据点集是多少?

What is the set of negative data points for each classifier when using OneVsRest classification in scikit-learn?

我正在尝试使用 sklearn.linear_model.LogisticRegression(multiclass='ovr') 训练 OneVsAll 多 class 逻辑回归模型。我的数据集有 1000 多个 classes 和 200 万个训练示例。

据我了解,此方法将训练 1000 个不同的 classifier,每个 class 一个。这样做时,每个 class 的正例集很容易识别。但是每个 classifier 的负样本集是多少?负样本集 = 我整个训练数据中的所有其他数据点吗?这不会造成不平衡问题并降低每个 classifier 的效率吗?

Is the set of negative examples = all the other data points in my entire training data?

是的。

Won't this create an imbalance problem and reduce the effectiveness of each individual classifier?

是的,根据 Bishop, Christopher M. (2006). "Pattern Recognition and Machine Learning". Springer, p. 338,这是此启发式方法的问题之一。如果在您的特定情况下这会严重降低性能,您可以考虑 other strategies.