All problems
DAgger Query Step
Problem
Measure the fraction of queried states where the learner disagrees with the expert, a DAgger diagnostic.
Return the number of differing actions divided by the number of states; empty input gives 0.0.
Hint
Disagreement rate tracks how much the learner has drifted from the expert.
Test cases
case 1
in: [["s0","s1","s2","s3"],[0,1,1,0],[0,0,1,1]]
expected: 0.5
case 2
in: [["a","b"],[2,2],[2,2]]
expected: 0
case 3
in: [[],[],[]]
expected: 0
Starter codePython
def dagger_disagreement(states, learner_actions, expert_actions):
# Your code here
pass3 test cases · run your code against them in the editor