正在学习
6.4 CROSS VALIDATION
6.4 CROSS VALIDATION
Cross validation is often used for model selection in conjunction with series estimators (see chapter 11) but is also applicable to model selection more generally. The idea of cross validation is to avoid overfitting a model by removing the correlation that causes the estimated in-sample loss to be “small” due to the use of the same observations for both parameter estimation and model evaluation purposes. In contrast to out-of-sample model selection methods discussed in chapter 16, cross validation makes use of the entire data set for both estimation and evaluation. The method averages over all possible combinations (or possibly a subset of these) of estimation and evaluation samples obtainable from a given data set.
The most common cross-validation approach is the crossvalidation estimator developed for independent data. This method holds out observations for model evaluation, with the remaining observations used for parameter estimation. The loss is calculated solely for each evaluation sample and gets repeated for all possible sets of data points used for model evaluation. In situations where the data are i.i.d., this procedure results in a very large number of possible evaluation sets and can be computationally very costly. For example, there are possible ways to split observations into different evaluation and estimation samples. For serially dependent time series the holdout samples are often constrained to be contiguous observations, which makes the estimation of average loss far simpler since there are only ways to split the sample. For each observation, t, the loss is evaluated on the evaluation sample and averaged across all values of omitting ends of the sample where there is no data after removing observations. The cross-validated estimator of MSE loss is
where is the estimator for that uses all of the sample apart from the observations from a to b with . Model selection proceeds by choosing the model, , that minimizes CV across all models
When data are serially independent, the usefulness of the approach comes from the fact that the parameter estimates will be independent of the evaluation sample. This breaks the connection that leads to overfitting the objective function. In most forecasting situations it is not reasonable to assume serial independence of the forecast errors, perhaps because some of the models are incorrectly specified. In addition, may include lags of which would induce correlation between the estimation and evaluation samples. This necessitates removing enough observations around each estimation date to ensure that the correlation between the estimation and evaluation sample is close to 0. Burman, Chow, and Nolan (1994) and
Racine (2000) propose methods to accomplish this. We briefly describe Racine’s block cross-validation approach.
Racine (2000) proposes to omit observations on each side of the validation sample in order to counter any dependence between the estimation and evaluation steps. As with the cross-validation method, a window of v observations is used before and after time t, resulting in a validation sample of observations to average over for each t. This means that the forecast is based on all observations apart from a block of observations running from . Under MSE loss, the cross-validated average loss statistic is
The method requires choosing two parameters, and v. One rule suggested by Racine is to set and use an evaluation sample equal to the integer part of .
Example 6.4.1 (MSE loss for sample estimate of the mean). Suppose the sample mean, is used to forecast an i.i.d. time series, in a sample with T observations. If we use the same data sample to estimate the sample mean and evaluate the average MSE loss, we have
Hence the squared in-sample estimation error, , gets subtracted from, rather than added to, the average in-sample loss. This happens because of the cross-product term which is expected to equal 0 in the out-of-sample period but is equal to . Cross validation attempts to remove this cross-product term by breaking the correlation between the forecast error and the estimation error induced in the insample period. It does so by separating observations used to estimate the parameters of the prediction model (here the sample mean) from observations used to evaluate the average loss.
In a setting with independently and identically distributed data, the classic crossvalidation method is to “leave-one-out.” Although this method is not particularly relevant for forecasting, it is helpful for illustrating how the method can be used to remove the cross-product term.
Example 6.4.2 (Cross validation for sample mean). For each point in time, t, suppose the sample mean is used as the estimate, where , we leave out observation when estimating the sample mean at time t. This term, by virtue of omitting , is now independent of . Specifically, we have
From the independence assumption, the cross-product term now has zero expectation and tends to be “small.” The cost of “leaving-one-out” is that the second term in (6.21) differs from the value we would use in the forecast, . This results in a slight difference in the expected loss, or, asymptotically, a different second-order term in the expected average loss. To see this, note that if we rearrange (6.21) and ignore terms that are 0 in expectation, we have
Now,
and so
If instead we used the usual forecast, , the expected average loss would be , the difference being due to our use of one less observation. This bias increases with the size of the prediction model; for example in a linear regression with regressors the bias of the leave-one-out loss would be instead o . The difference between the estimated loss and the true loss is, however, of a lower order than that for in-sample evaluation.
练习题
What is the primary purpose of cross validation in model selection?
How does cross validation differ from out-of-sample model selection methods?
Which of the following are true about leave--out cross validation for independent data? (Select all that apply)
For serially dependent time series, the holdout samples in leave--out cross validation are often constrained to be contiguous observations.
The cross-validated estimator of MSE loss for serially dependent time series is given by . What does represent?
Explain how model selection proceeds using cross validation.
When data are serially independent, cross validation is useful because the parameter estimates will be independent of the evaluation sample, breaking the connection that leads to overfitting.
What are some challenges in forecasting with serial dependence? (Select all that apply)
What is Racine's approach to block cross validation designed to do?
In Racine's block cross validation approach, the cross-validated average loss statistic under MSE loss is given by . What parameters need to be chosen in this method?
How does the leave--out cross validation method handle the issue of overfitting in models with serially dependent time series data?
Which of the following best describes the relationship between in-sample ranking and population expected loss in the context of model selection?
When using leave--out cross validation for independent data, which of the following statements is true about the number of possible evaluation sets when and ?
Which of the following are reasons for using cross validation instead of in - sample ranking for model selection? (Select all that apply)
The AIC and BIC information criteria and leave - - out cross validation for independent data both attempt to address the issue of overfitting in model selection.
In the context of leave - - out cross validation for independent data, when and , the number of possible ways to split observations into different evaluation and estimation samples is , which is calculated using the formula . This formula is based on the principle of ___.
登录后解锁笔记、知识点解析、AI 问答
立即登录