All problems
Repeated CV Variance
Problem
Compute the between-repeat variance of repeated cross-validation. Average the fold scores inside each repeat, then return the population variance of those repeat means. Fewer than two non-empty repeats returns 0.0.
Hint
High variance across repeats means the reported score depends heavily on the random split.
Test cases
case 1
in: [[[0.8,0.9],[0.7,0.8],[0.75,0.85]]]
expected: 0.0016666666666666698
case 2
in: [[[1],[0],[0.5]]]
expected: 0.16666666666666666
case 3
in: [[[0.5],[]]]
expected: 0
case 4
in: [[[]]]
expected: 0
Starter codePython
def repeated_cv_variance(repeat_scores):
# Your code here
pass4 test cases · run your code against them in the editor