Given hashes (or unique IDs) of rows in your training and validation sets, return the indices in the validation set whose hash also appears in the training set.
Signature: def find_leakage(train: list, val: list) -> list
Return validation indices in ascending order. Use a set for the training data to make lookup O(1).
Math
Asked at
import numpy as np
def find_leakage(...):
pass
Premium problem
Free accounts include problems #1–20. Upgrade to unlock the editor, hidden test cases, and reference solutions for every problem.
Already premium?