All problems
Ensemble Critic Variance
Problem
Compute the per-action variance of Q values across an ensemble.
predictions[m][a] is action a's value from ensemble member m; return the population variance across members for each action. An empty ensemble returns [].
Hint
Disagreement across independent critics is a cheap uncertainty signal.
Test cases
case 1
in: [[[1,2],[3,2]]]
expected: [1,0]
case 2
in: [[[1],[2],[3]]]
expected: [0.6666666666666666]
case 3
in: [[]]
expected: []
Starter codePython
def ensemble_critic_variance(predictions):
# Your code here
pass3 test cases · run your code against them in the editor