Softmax Function
The same logits read [0.9817, 0.0180, 0.0003] at temperature 0.25 and [0.3672, 0.3322, 0.3006] at temperature 10.
The same logits read [0.9817, 0.0180, 0.0003] at temperature 0.25 and [0.3672, 0.3322, 0.3006] at temperature 10.
The five binary models gave probabilities summing to 1.0452, 0.9266, 1.0837 and 1.0159 on four test rows. predict_proba divides by the sum.
Accuracy 0.8575 and micro F1 0.8575 — and the rarest class had a recall of 0.0382. Macro F1 came out at 0.6922.
Weighted precision 0.8071, weighted recall 0.4600, weighted F1 0.3670 — below both, which scikit-learn’s own documentation warns about.
Accuracy, micro precision, micro recall and micro F1 all read 0.8000 on the same single-label data. Four columns, one number.
The same predictions gave a macro precision of 0.5159 or 0.8493 depending on one keyword argument — and two macro F1 definitions gave 0.5152 and 0.5170.
Extend binary logistic regression to many classes with softmax, cross-entropy, and a numerically stable NumPy implementation.