Leave-p-Out Cross-Validation
The method holds out every possible subset of p rows in turn, fits the model on the remaining rows and scores the predictions for the held-out rows, then averages the scores over all subsets. For linear regression the held-out errors come from an exact matrix identity, so no refitting is needed; logistic regression is refitted for each subset. With p = 1 it is leave-one-out cross-validation.
가능한 모든 p개 행 묶음을 차례로 떼어 두고 나머지로 모형을 적합한 뒤, 떼어 둔 행의 예측을 평가하고 모든 묶음에 걸쳐 평균합니다. 선형회귀는 정확한 행렬 항등식으로 제외 오차를 구해 다시 적합하지 않으며, 로지스틱 회귀는 묶음마다 다시 적합합니다. p = 1 이면 한 개씩 빼는 교차검증과 같습니다.
How well does my regression predict new observations when several rows at a time are left out of fitting?
여러 행을 한꺼번에 빼고 적합했을 때 회귀모형이 새 관측값을 얼마나 잘 예측하는지 알고 싶습니다.
For linear regression the method reports the leave-p-out mean squared error, root mean squared error, mean absolute error, their spread across splits, the leave-one-out error and a predictive R squared. For logistic regression it reports accuracy, log loss and Brier score.
When to use Leave-p-Out Cross-Validation
- The sample is small and you want an exhaustive, non-random cross-validation estimate.
- You want a less optimistic error estimate than leave-one-out by leaving out more rows.
- You compare predictor sets for a linear or logistic model.
When to use something else
- The data are ordered in time: use Blocked Cross-Validation for Dependent Data
- You want optimism-corrected performance from resampling: use Bootstrap Optimism-Corrected Model Validation
- You have a large data set and a single test split is enough: use Split-Sample (Hold-Out) Validation
Assumptions and requirements
- Rows are exchangeable (no grouping or time order)
- Every training set of n - p rows can fit the model
What the analysis reports
- Cross-validated loss averaged over all held-out subsets
- Spread of the loss across subsets
- Leave-one-out and training error for comparison
- Histogram of per-split loss
How to report it
Leave-2-out cross-validation of a linear regression (n = [value], [value] splits) gave a mean squared prediction error of [value] (RMSE [value]).
Related methods
- Leave-One-Out Influence Measures and PRESS for Linear Regression
- Blocked Cross-Validation for Dependent Data
- Split-Sample (Hold-Out) Validation
- Bootstrap Optimism-Corrected Model Validation
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with scikit-learn and statsmodels at a stated tolerance of 1e-7.
독립 계산. scikit-learn·statsmodels 대조 참조 시험 1건 통과(허용오차 1e-7).
Tolerances are relative differences (absolute differences for values near zero). R comparisons and reference tests are re-run before each release of the analysis engine.
허용오차는 상대 차이입니다(0 근처 값은 절대 차이). R 대조와 참조 시험은 분석 엔진을 배포할 때마다 다시 돌립니다.
Run Leave-p-Out Cross-Validation on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable and predictor (feature) columns
- Price
- 600 credits for one analysis up to 10,000 rows (complexity level 4); larger or wider data costs more. Optional methodologist review: 2400 credits.
- Checking
- Compared with independent computations
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.