All problems
DAgger Aggregation Step
Problem
Aggregate a new DAgger round into the training dataset.
Append the newly queried states and expert actions to the old data and report the fraction of the merged dataset that comes from the new expert labels. Return [merged_states, merged_actions, expert_fraction]; an empty merge gives fraction 0.0.
Hint
DAgger grows the dataset with expert labels on the learner's own visited states.
Test cases
case 1
in: [["s0"],[0],["s1","s2"],[1,0]]
expected: [["s0","s1","s2"],[0,1,0],0.6666666666666666]
case 2
in: [[],[],[],[]]
expected: [[],[],0]
case 3
in: [[],[],["x"],[2]]
expected: [["x"],[2],1]
Starter codePython
def dagger_aggregation_step(states, actions, new_states, new_actions):
# Your code here
pass3 test cases · run your code against them in the editor