All problems
Implicit Feedback Confidence
Problem
Compute implicit-feedback confidence values: 1 + alpha * interaction.
Return the list; empty input returns [].
Hint
Confidence grows linearly with the strength of implicit interaction.
Test cases
case 1
in: [[0,1,5],0.5]
expected: [1,1.5,3.5]
case 2
in: [[2],1]
expected: [3]
case 3
in: [[],0.5]
expected: []
Starter codePython
def implicit_confidence(interactions, alpha):
# Your code here
pass3 test cases · run your code against them in the editor