Natural Language Processing · free preview

Softmax Regression and Evaluation Metrics

The softmax over per-class logits, multiclass cross-entropy, confusion matrices with precision, recall and F-measure, cross-validation, and the paired bootstrap test.

1. Softmax Regression and Evaluation Metrics

Softmax Regression and Evaluation Metrics

2. Precision, recall, and their combination

Precision, recall, and their combination

3. Softmax, metrics, and a bootstrap test

Softmax, metrics, and a bootstrap test

4. Macro or micro?

A three-class triage system handles a rare storm class with 17 test items and a routine class with 100. Performance on the rare class matters as much as on the frequent one. Which averaging scheme fits, and what does the alternative do?

5. The harmonic mean in F1

A class achieves precision P=0.5P = 0.5 and recall R=0.4R = 0.4. Compute F1=2PRP+RF_1 = \frac{2PR}{P+R} and round to three decimals.

6. Softmax of three logits

Compute the softmax weight for the largest logit when z=[2,0,−1]\mathbf{z} = [2, 0, -1], that is exp⁡(2)/(exp⁡(2)+exp⁡(0)+exp⁡(−1))\exp(2) / (\exp(2) + \exp(0) + \exp(-1)), and round to three decimals.

7. Precision for one class

For the class of interest, a classifier records 1010 true positives and 44 false positives. Compute precision and round to three decimals.

8. The paired bootstrap threshold

On a paired test set, system A beats system B by δ(x)=0.1\delta(x) = 0.1 accuracy. The paired bootstrap resamples the test set and compares each resampled difference δ(x(i))\delta(x^{(i)}) against a threshold that corrects for the bias the resamples inherit from the observed data. A resample counts toward the p-value when δ(x(i))≥t\delta(x^{(i)}) \geq t. What is tt? Answer as a decimal.

Practice this interactively

Free account · instant grading · spaced review that schedules itself.

Start this course for free