Repeated random splits (or repeated cross-validation) reuse training data, so the per-split differences are correlated. Nadeau and Bengio (2003) fix the variance by inflating it with the ratio of test to training size. For k repeats with differences d_i, the corrected statistic is
t = mean(d) / sqrt((1/k + n_test / n_train) * var(d)), with var using k - 1.
Implement corrected_resampled_t(diffs, n_train, n_test) and return t as a float.
diffs is a 1-D array with k >= 2 entries.n_train > 0 and n_test > 0. Otherwise raise ValueError.diffs raises ValueError, since the statistic is undefined.Compute the correction factor 1/k + n_test/n_train once. With k = 3, n_train = 9, and n_test = 1, it equals 4/9.
No results yet
Run your code to check it against the examples, or submit to run every test.