评估指标 道练习题
33 道题 · 0 已解决
模型的优劣取决于你的衡量方式。评估指标将预测结果转化为可比较的数字,但每个指标在处理平局 (ties)、平均方式和边界情况时都隐藏了可能改变结果的选择。这些题目要求你亲自实现常用的指标,以便你准确了解它们在奖励什么。你将构建 confusion matrix,计算 precision, recall 和 F1,比较 macro 和 micro F1,通过统计排序对来计算 ROC AUC,构建包含平局分数的 precision recall 曲线,使用 expected calibration error 衡量 calibration,计算 mean reciprocal rank 和 NDCG at k,使用 Cohen's kappa 衡量评分者一致性,无偏估计 pass@k,并使用 ROUGE-L 和 sentence BLEU 对生成的文本进行评分。从关于 confusion matrix 以及 precision, recall 和 F1 的 Easy 题目开始。然后进阶到 AUC、排序指标和 kappa,最后完成 BLEU 和包含平局情况的 average precision。选择并解释正确的指标是一项核心面试技能,在实际工作中,错误的指标可能会让一个弱模型看起来很强,或者让一个强模型看起来很差。
简单 13
- 根据预测结果计算 precision, recall 和 F1
- 使用 expected calibration error 衡量分类器的过度自信程度
- 构建混淆矩阵
- 计算 mean reciprocal rank
- 通过 self-consistency 多数投票选择最终答案
- 将语言模型 loss 转换为 bits per byte
- 计算回归的 R-squared 和 adjusted R-squared
- 计算二分类器的 Matthews correlation coefficient
- Measure top-1 and top-5 accuracy from logits
- Report RMSE, MAE and MAPE for a forecast
- Weigh recall over precision with the F-beta score
- Score probability forecasts with the Brier score
- Compute lift at the top of a model's ranking
中等 12
- 通过统计排序对来计算 ROC AUC
- 使用 NDCG@k 对搜索排名进行评分
- 计算多分类分类器的 macro 和 micro F1
- 使用 Cohen's kappa 衡量评分者一致性
- 无偏估计 pass@k
- 通过最长公共子序列计算 ROUGE-L F1
- 为数学验证器提取并归一化最终答案
- Score pairwise LLM-judge results with position swapping
- 计算 QA 答案的 Exact Match 和 Token F1
- 计算具有相同分数的 ROC 曲线点
- 选择使 F1 最大化的决策阈值
- Calibrate a classifier with temperature scalingPro
困难 8
- Build a precision recall curve and average precision with tied scoresPro
- Compute sentence BLEU with brevity penaltyPro
- Score multiple-choice answers by log-likelihoodPro
- Evaluate perplexity of a long text with a strided sliding windowPro
- Batch LM cross-entropy with ignore index, perplexity and gradientPro
- Calibrate classifier scores with Platt scalingPro
- Compare two clusterings with the adjusted Rand indexPro
- Compare two shelf-camera detectors with mean average precisionPro