All problems
Ensemble Probability Average
Problem
Average several probability vectors element-wise: given a list of per-model probability vectors for one sample, return their mean vector.
Empty input returns [].
Hint
Average each class probability across all models independently.
Test cases
case 1
in: [[[0.2,0.8],[0.4,0.6]]]
expected: [0.30000000000000004,0.7]
case 2
in: [[[0.1,0.2,0.7],[0.3,0.3,0.4],[0.5,0.25,0.25]]]
expected: [0.3,0.25,0.45]
case 3
in: [[[0.5,0.5]]]
expected: [0.5,0.5]
case 4
in: [[]]
expected: []
Starter codePython
def average_ensemble_probs(prob_lists):
# Your code here
pass4 test cases · run your code against them in the editor