Course-1, Week-1, Assignment: Data Leakage

Hello,

I am trying to solve the leakage problem. But I am getting error. It says:

5 Tests Passed
1 Test Failed

Also when I run the next cell to see whether the dataset has duplicate patients, my code shows:

Train-Valid: True
Train-Test: True
Valid-Test: True

But expected output is:

Train-Valid: True
Train-Test: False
Valid-Test: False

Please give me any hint if my code is wrong. Or if there is any problem.

Thanks in advance!

Hello,

Kindly remove the codes from your post as it is against community guidelines to share on public post.

The reason your expected output differs is you have not defined both of the data frames for column values looking for these unique values.

Regards
DP

1 Like