Natural Language Processing · 免费预览

软最大回归与评估指标

对各类别未归一化得分的软最大化、多类别交叉熵、带有精确率、召回率与 F 值的混淆矩阵、交叉验证,以及配对自助法检验。

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. 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.

5. 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.

6. 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.

7. 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?

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.

进入交互式练习

免费注册 · 即时批改 · 自动安排间隔复习。

免费开始这门课