TorchedUp
ProblemsPremium
TorchedUp
Train/Val Leakage DetectorMedium
ProblemsPremium

Detect Train/Val Leakage

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

Python (numpy)0/3 runs today

Test Results

○one leak
○no leak
○multiple leaks🔒 Premium
Advertisement