Comparing Two Learners by Cross-Validation (5x2cv t, 5x2cv F, Corrected Resampled t)
The 5x2cv test compares two learning algorithms by repeating two-fold cross-validation five times and testing the ten paired differences in held-out loss with Dietterich's t, Alpaydin's F or a corrected resampled t.
5x2cv 검정은 2겹 교차검증을 다섯 번 반복해 얻은 열 개의 짝지은 손실 차이로 두 학습 알고리즘의 성능 차이를 Dietterich t, Alpaydin F 또는 수정 재표본 t로 검정하는 방법입니다.
My random forest beat logistic regression by two points of accuracy in cross-validation; is that difference statistically meaningful or just split-to-split noise?
교차검증에서 랜덤 포레스트가 로지스틱 회귀보다 정확도가 2%p 높게 나왔는데, 이 차이가 통계적으로 의미 있는지 어떻게 확인하나요?
Run both learners on the same five replications of stratified two-fold cross-validation and test the ten paired loss differences with the 5x2cv F test, which keeps the type I error close to nominal. A small p value says the gap is larger than the variation you would expect from resampling alone.
When to use Comparing Two Learners by Cross-Validation (5x2cv t, 5x2cv F, Corrected Resampled t)
- You want to know whether one learner has lower expected error than another on this kind of data.
- Ordinary paired t tests on k-fold scores are too liberal because the folds share training data.
- Both learners can be refitted ten times within the time you have.
When to use something else
- You are comparing many learners at once; use a Friedman test with Nemenyi post hoc across datasets or folds.
- You only have a single fixed test set and two sets of predictions; use McNemar's test for paired classifications.
Assumptions and requirements
- Rows are independent; grouped or time-ordered data need grouped or forward-chaining splits.
- Each half-sample is large enough for both learners to train sensibly.
- Loss is the error rate for classes and mean squared error for numeric outcomes.
What the analysis reports
- Loss of each learner on every fold and the paired differences
- Dietterich 5x2cv t (5 df), Alpaydin 5x2cv F (10, 5 df) and corrected resampled t (9 df) with p values
- McNemar test on the first replication for classifiers
- Mean loss or accuracy of each learner
How to report it
Across five replications of two-fold cross-validation, [model A] had a mean error rate of [value] and [model B] [value]; the 5x2cv F test indicated a [significant/non-significant] difference, F(10, 5) = [value], p = [value].
Common variants
자주 쓰는 설정
The same analysis with settings already chosen. Each runs Comparing Two Learners by Cross-Validation (5x2cv t, 5x2cv F, Corrected Resampled t) itself, at the same price.
- Nested cross-validation confidence interval — generalization ci set to “nested_cv”
- Corrected resampled t confidence interval — generalization ci set to “corrected_t”
Related methods
- McNemar Test
- Repeated k-Fold Cross-Validation
- Friedman Test
How this method is validated
이 방법의 검증 근거
- Independent computation. 1 reference test compares the results with direct computations (formulas, enumeration or simulation).
독립 계산. 직접 계산(식·열거·모의실험) 대조 참조 시험 1건 통과.
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 Comparing Two Learners by Cross-Validation (5x2cv t, 5x2cv F, Corrected Resampled t) on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable and predictor (feature) columns
- Price
- 250 credits for one analysis up to 10,000 rows (complexity level 2); larger or wider data costs more. Optional methodologist review: 1200 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.