Skip to content
DeepForgeby svx
All problems

Evaluation Episode Count

Problem

Compute the number of evaluation episodes needed for a target confidence margin: ceil((z * std / margin)^2). A non-positive margin returns 0.

Hint

Halving the desired margin quadruples the required episode count.

Test cases

case 1
in: [2,0.5,1.96]
expected: 62
case 2
in: [1,1,2]
expected: 4
case 3
in: [0,0.5,1.96]
expected: 0
case 4
in: [2,0,1.96]
expected: 0
Starter codePython
import math
def evaluation_episode_count(std, margin, z):
    # Your code here
    pass

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