Skip to content
Quantoros

What does assigning a larger classweight do to the SVC optimization for that class?

Classic MLLevel: IntermediatePer-class margin penalties

What does assigning a larger class_weight do to the SVC optimization for that class?

Hints
  • Locate the weight inside the optimization objective.
  • Cost-sensitive fitting differs from threshold tuning.

Answer

It scales the class's effective C, increasing the penalty for its margin violations relative to other classes. It changes training costs, not a post-hoc probability threshold.

Source and licence: scikit-learn 1.7.2 — svm · BSD-3-Clause · answer: Quantoros editorial

Related questions