Skip to content
Quantoros

How does SGDClassifier extend a binary linear loss to several classes?

Classic MLLevel: IntermediateSGD multiclass construction

How does SGDClassifier extend a binary linear loss to several classes?

Hints
  • Each class is contrasted with all others.
  • Check output-to-class ordering.

Answer

It fits one-versus-rest binary models and compares their decision scores. The coefficient matrix has one row per class in the fitted classes_ order.

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

Related questions