All problems
ICE Variance
Problem
Compute the population variance of ICE curves at each grid position (rows are samples, columns are grid points).
Return [] when there are no samples or curves.
Hint
High ICE variance reveals heterogeneous feature effects across samples.
Test cases
case 1
in: [[[1,2],[3,4],[5,6]]]
expected: [2.6666666666666665,2.6666666666666665]
case 2
in: [[[1,1]]]
expected: [0,0]
case 3
in: [[]]
expected: []
Starter codePython
def ice_variance(ice_curves):
# Your code here
pass3 test cases · run your code against them in the editor