All problems
Reward Model Ensemble Variance
Problem
Compute the population variance of reward predictions across an ensemble: the mean of (p - mean)^2 over the predictions. An empty ensemble returns 0.0.
Hint
High ensemble variance marks preference pairs the reward model is unsure about.
Test cases
case 1
in: [[1,2,3]]
expected: 0.6666666666666666
case 2
in: [[5,5,5]]
expected: 0
case 3
in: [[]]
expected: 0
case 4
in: [[-1,1]]
expected: 1
Starter codePython
def reward_model_ensemble_variance(predictions):
# Your code here
pass4 test cases · run your code against them in the editor