Skip to content
DeepForgeby svx
All problems
MediumML Fundamentalsml-119

Cross-Validation Score Std

Problem

Compute the population standard deviation of per-fold cross-validation scores.

Empty input or a single score returns 0.0.

Hint

Use the population variance (divide by n) and take the square root.

Test cases

case 1
in: [[0.8,0.9,1]]
expected: 0.08164965809277258
case 2
in: [[1,1,1]]
expected: 0
case 3
in: [[0.5]]
expected: 0
case 4
in: [[]]
expected: 0
Starter codePython
def cv_score_std(fold_scores):
    # Your code here
    pass

4 test cases · run your code against them in the editor