All problems
LLR Addition
Problem
Combine independent soft observations by adding their log-likelihood ratios. Return the sum of the list.
Hint
In the log domain, multiplying likelihood ratios becomes adding LLRs.
Test cases
case 1
in: [[1,2]]
expected: 3
case 2
in: [[-1,1]]
expected: 0
case 3
in: [[0.5]]
expected: 0.5
case 4
in: [[2,-3,1]]
expected: 0
Starter codePython
def llr_add(llrs):
# Your code here
pass4 test cases · run your code against them in the editor