Compute the out-of-bag mask of a bootstrap sample. n is the size of the original dataset and bootstrap_indices are the indices that were drawn (repeats allowed).
Implement solve(n, bootstrap_indices).
Returns. Return a boolean NumPy array of length n that is True for every index that was not drawn.
Example 1
Input:
solve(10, [0, 1, 2])
Output:
[False, False, False, True, True, True, True, True, True, True]
Example 2
Input:
solve(5, [0, 2, 2])
Output:
[False, True, False, True, True]
No results yet
Run your code to check it against the examples, or submit to run every test.