Skip to main content
QUICK REVIEW

[论文解读] Cross-validation: what does it estimate and how well does it do it?

Stephen Bates, Trevor Hastie|arXiv (Cornell University)|Apr 1, 2021
Statistical Methods and Inference参考文献 51被引用 45
一句话总结

该论文表明交叉验证估计的是跨训练集的平均预测误差(Err),而不是特定最终模型的误差(ErrXY),并引入嵌套交叉验证以提高预测误差置信区间的覆盖率。

ABSTRACT

Cross-validation is a widely-used technique to estimate prediction error, but its behavior is complex and not fully understood. Ideally, one would like to think that cross-validation estimates the prediction error for the model at hand, fit to the training data. We prove that this is not the case for the linear model fit by ordinary least squares; rather it estimates the average prediction error of models fit on other unseen training sets drawn from the same population. We further show that this phenomenon occurs for most popular estimates of prediction error, including data splitting, bootstrapping, and Mallow's Cp. Next, the standard confidence intervals for prediction error derived from cross-validation may have coverage far below the desired level. Because each data point is used for both training and testing, there are correlations among the measured accuracies for each fold, and so the usual estimate of variance is too small. We introduce a nested cross-validation scheme to estimate this variance more accurately, and we show empirically that this modification leads to intervals with approximately correct coverage in many examples where traditional cross-validation intervals fail.

研究动机与目标

  • 在预测建模中澄清交叉验证的估计目标,特别是线性模型的情况。
  • 证明CV估计的是 Err(跨训练集的平均误差),而不是 ErrXY(最终模型的误差)。
  • 展示由于折叠之间的相关性,天真CV基于的置信区间的局限性。
  • 提出嵌套交叉验证(NCV)以获得更准确的预测误差置信区间。
  • 将CV与数据拆分、Mallows Cp以及自举等相关的预测误差估计量进行比较。

提出的方法

  • 将 ErrXY 定义为在完整训练集上拟合的模型的样本外误差,将 Err 定义为对看不见的训练集的期望。
  • 证明线性不变估计量(包括使用 OLS 的 CV 和平方误差)在给定 X 的条件下与 ErrXY 条件独立(定理 1)。
  • 确立 CV 的目标是 Err 而非 ErrXY,并且 ErrX(给定 X 的条件均值)在总体上比 ErrXY 更接近 Err(定理 2 与推论)。
  • 分析 CV 因在 CV 中使用较小的训练子集而非全样本训练所引起的偏差(在不同情形下讨论偏差)。
  • 引入嵌套交叉验证(NCV)作为对 CV 的一种修改,以获得无偏的标准误估计和更好的预测误差区间覆盖(定理 3)。
  • 将 CV 与 Cp 型估计量联系起来,作为具有类似目标行为的线性不变估计量(第 3.5 节)。
Figure 1 : A plot of the true error of a model versus the CV estimates for 1000 replicates of the model from Section 1.1 . The blue curve shows the average midpoint of the naïve CV confidence intervals. The green bands show the average 90% confidence interval for prediction error given by naïve CV.
Figure 1 : A plot of the true error of a model versus the CV estimates for 1000 replicates of the model from Section 1.1 . The blue curve shows the average midpoint of the naïve CV confidence intervals. The green bands show the average 90% confidence interval for prediction error given by naïve CV.

实验结果

研究问题

  • RQ1在预测建模中,交叉验证究竟估计了什么,特别是在线性模型下?
  • RQ2基于 CV 的区间在覆盖预测误差方面的表现如何,是否可以改进?
  • RQ3数据拆分、Mallows Cp 与自举在预测误差估计方面的比较如何?
  • RQ4修改后的 CV 方案(嵌套 CV)能否为预测误差提供更准确的置信区间?
  • RQ5在高维/线性设置中,Err、ErrX、ErrXY 与 CV 产生的估计量之间有什么关系?

主要发现

  • CV 估计 Err(跨训练集的平均预测误差),而不是 ErrXY(在观测到的训练集上拟合的模型的误差)。
  • 像使用 OLS 的 CV 这样的线性不变估计量,在估计 Err 或 ErrX 时的均方误差更小,而在估计 ErrXY 时更大(定理 1 与推论 1)。
  • 在比例渐进情形中,ErrX 和 Err 在渐进意义上比 ErrXY 更接近 Err,Var(ErrX) = Θ(1/n^2) 且 Var(ErrXY|X) = Θ(1/n)(定理 2)。
  • 天真的 CV 区间经常低于覆盖率,因为忽略了折内误差之间的相关性;NCV 在许多情况下提供接近正确覆盖率的区间(图 1 讨论与定理 3)。
  • Mallow's Cp 及基于 Cp 的方法也是线性不变的,且对 Err/ErrX 的目标行为与 ErrXY 相似(第 3.5 节)。
Figure 2 : Possible targets of inference for cross-validation. Here, $(X,Y)$ is the training data and $\mbox{{Err}}_{XY}$ is the average error of the model fit on $(X,Y)$ on a test data set of infinite size. From left to right, the random variables above are a constant, a function of $X$ only, and a
Figure 2 : Possible targets of inference for cross-validation. Here, $(X,Y)$ is the training data and $\mbox{{Err}}_{XY}$ is the average error of the model fit on $(X,Y)$ on a test data set of infinite size. From left to right, the random variables above are a constant, a function of $X$ only, and a

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。