Lesson 6.5ModelCode~50 min
Many classes: softmax regression
From yes/no to “which of these?”: one score per class, softmax, and cross-entropy.
Module 6 · 0/11 done
More than yes or no
Logistic regression answers yes-or-no questions. But which digit is this, 0 to 9? Which of 50 000 words comes next? For classes we give the model scores (one weighted sum per class) and turn them into probabilities with softmax, from Module 5.
All the weights together form a matrix : one row per input feature, one column per class. The loss is cross-entropy, and the gradient is just as tidy as before: predicted probabilities minus the true answer.