Skip to content
DeepForgeby svx
All problems
EasyML Fundamentalsml-355

Cold-Start User Share

Problem

Compute the cold-start user share: the fraction of users whose interaction count is below min_interactions. Empty input returns 0.0.

Hint

A large cold-start share means the recommender must lean on fallbacks and popularity priors.

Test cases

case 1
in: [[1,5,0,10],3]
expected: 0.5
case 2
in: [[5,6],3]
expected: 0
case 3
in: [[0,0],1]
expected: 1
case 4
in: [[],3]
expected: 0
Starter codePython
def cold_start_share(interaction_counts, min_interactions):
    # Your code here
    pass

4 test cases · run your code against them in the editor