All problems
TTA Probability Average
Problem
Average the class probabilities from several test-time augmentation runs.
Each prediction is a probability vector of the same length. Return the elementwise mean rounded to 4 decimal places.
Test cases
case 1
in: [[[0.8,0.2],[0.6,0.4],[0.7,0.3]]]
expected: [0.7,0.3]
case 2
in: [[[1,0]]]
expected: [1,0]
case 3
in: [[[0.1,0.9],[0.3,0.7]]]
expected: [0.2,0.8]
case 4
in: [[[0.25,0.25,0.5],[0.5,0.25,0.25]]]
expected: [0.375,0.25,0.375]
Starter codePython
def tta_average(predictions):
# Your code here
pass4 test cases · run your code against them in the editor