概述
These are fitting diagnoses to investigate, not conclusions guaranteed by model size or one accuracy number.
深入探讨
A trained model should be evaluated beyond the examples used to fit it. Under comparable training and held-out conditions, high training performance with much weaker held-out performance can indicate overfitting to training-specific patterns. Poor performance on both sets can be consistent with underfitting, although failed optimization, unsuitable data, and other causes also need consideration. The labels therefore guide diagnosis rather than substitute for it. Changing relevant features or model capacity can be worth testing when the representation is too limited, while regularization and data choices can affect how flexibly a model fits. Bias and variance describe another view of prediction error: bias concerns systematic deviation of the estimated predictor, and variance concerns sensitivity to the sampled training data. Small models are not automatically biased, and large models are not automatically high-variance in every task. The data-generating relationship and fitting procedure matter. Validation and final testing also have different roles. Validation data can help choose a model, hyperparameters, or stopping point. Repeatedly using the final test set for those choices can make the reported final estimate optimistic, so final testing should remain separate when possible. Modern research includes double-descent curves where test error rises near an interpolation regime and falls again as capacity increases. Such observations do not make that curve universal. Assess the actual task, information available, data splits, and fitting procedure rather than infer reliability solely from parameter count.
现实世界的实施
垃圾邮件过滤器,标记包含特定发件人姓名的每封电子邮件,因为该发件人恰好在训练数据中大量发送垃圾邮件,完全错过了新的垃圾邮件发送者(过度拟合)。
仅使用平方英尺并忽略位置、卧室和条件的房价模型,因此它在昂贵的社区中严重缺失(拟合不足)。
医学图像分类器学习检测医院的扫描仪水印而不是疾病,但在其他医院失败(过度拟合虚假特征)。
绘制训练期间的训练损失与验证损失的图,并在验证损失开始上升而训练损失持续下降时停止(及早发现过度拟合)。
过拟合和欠拟合的未来
Research can examine fitting behavior across architectures, optimization methods, sample sizes, and data conditions. Results should identify the setup in which a curve or diagnostic was observed. Larger models and richer features can be candidates for evaluation, while they do not guarantee improved generalization. Reports should distinguish validation used for selection from final testing and explain the available information, so an apparent improvement can be assessed alongside sampling uncertainty and possible distribution changes.
付诸实践
为什么这很重要
- 更清晰的判决. 它可以帮助您将清晰的技术声明与营销语言分开。
- 成本与预算. 在花费金钱或时间之前,您可以提出更好的实施问题。
- 团队与工作流程. 具有共同理解的团队可以做出更好的产品、政策和学习决策。
留意
- 不同的团队可能会以不同的方式使用同一术语,因此请尽早定义范围。
- 基准测试可能看起来很强大,但实际性能却参差不齐。
- 忽视数据质量和评估计划通常会产生脆弱的结果。
后续步骤
- 从您需要的结果的简单语言定义开始。
- 在测试之前选择一种成功指标和一种失败条件。
- 使用代表性数据运行小型试点,而不是完善的演示集。
- 记录过度拟合和欠拟合在哪些方面有帮助,以及哪些更简单的方法更好。
不断探索
常见问题
什么是过拟合和欠拟合?
Overfitting describes fitting training-specific patterns that generalize poorly, while underfitting describes failing to capture useful structure even in the training data. These are fitting diagnoses to investigate, not conclusions guaranteed by model size or one accuracy number.
Under comparable train and held-out conditions, an illustrative model scores 98% on training and 71% on held-out data. Which fitting concern is consistent with that gap?
The gap is consistent with overfitting, while a complete diagnosis should also check evaluation and data conditions.
Which performance pattern can be consistent with a model underfitting useful structure?
Underfitting concerns inadequate fitting of useful structure, but the pattern should be investigated alongside other possible causes.
In a bias-variance analysis, what does high estimator variance concern?
Estimator variance concerns changes across sampled training sets, not a universal outcome of parameter count.
A house-price model has too limited a representation of relevant inputs and fits poorly. Which candidate change should be evaluated?
Testing a better representation can address an underfitting hypothesis; it is not a guaranteed improvement.
为什么保留验证或测试集对于检测过度拟合至关重要?
如果只看训练精度,过拟合是看不见的。对看不见的数据进行评估暴露了记忆和真正的概括之间的差距。