# I can't understand the demand of C1\_W1\_Assignment

**URL:** <https://community.deeplearning.ai/t/i-cant-understand-the-demand-of-c1-w1-assignment/546014>\
**Category:** AI for Medical Diagnosis\
**Tags:** week-module-1\
**Created:** [January 16, 2024, 2:00pm UTC](https://community.deeplearning.ai/t/i-cant-understand-the-demand-of-c1-w1-assignment/546014 "2024-01-16T14:00:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WhiteBlack](https://avatars.discourse-cdn.com/v4/letter/w/f9ae1b/32.png) [@WhiteBlack](https://community.deeplearning.ai/u/WhiteBlack)\
**Post date:** [January 16, 2024, 2:00pm UTC](https://community.deeplearning.ai/t/i-cant-understand-the-demand-of-c1-w1-assignment/546014/1 "2024-01-16T14:00:35Z")

</div>

hi guys! i am a beginner of deep learning in medical, and this is my first try to finish an assignment of diagnose

but i can’t understand what should i do in this section of C1\_W1\_Assignment

i have defined what is df1 & df2, and i found the overlap patients , df1\_patients\_unique, df1\_patients\_unique

but i don’t know what the`leakage` equals ? and how can i get the output like the expected output under?

 ![image](https://global.discourse-cdn.com/dlai/original/3X/e/4/e4a2a7db6f305be7fc4fe2a7fb13c05998e7a2ea.png)

---

<div class="post-metadata">

**Author:** ![Deepti\_Prasad](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/deepti_prasad/32/165831_2.png) [@Deepti\_Prasad](https://community.deeplearning.ai/u/Deepti_Prasad)\
**Post date:** [January 16, 2024, 2:04pm UTC](https://community.deeplearning.ai/t/i-cant-understand-the-demand-of-c1-w1-assignment/546014/2 "2024-01-16T14:04:42Z")

</div>

Hello @WhiteBlack,

kindly share only the error image. Do not include any of grader code in your image while posting on public thread topic.

Regards  
DP

---

<div class="post-metadata">

**Author:** ![WhiteBlack](https://avatars.discourse-cdn.com/v4/letter/w/f9ae1b/32.png) [@WhiteBlack](https://community.deeplearning.ai/u/WhiteBlack)\
**Post date:** [January 17, 2024, 11:55am UTC](https://community.deeplearning.ai/t/i-cant-understand-the-demand-of-c1-w1-assignment/546014/3 "2024-01-17T11:55:52Z")

</div>

sorry, i have edited

---

<div class="post-metadata">

**Author:** ![Deepti\_Prasad](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/deepti_prasad/32/165831_2.png) [@Deepti\_Prasad](https://community.deeplearning.ai/u/Deepti_Prasad)\
**Post date:** [January 17, 2024, 11:57am UTC](https://community.deeplearning.ai/t/i-cant-understand-the-demand-of-c1-w1-assignment/546014/4 "2024-01-17T11:57:24Z")

</div>

Hello @WhiteBlack,

You have shared an image of the expected output but not of the error you are getting. When I asked you for the error image, I mean when you didn’t the expected output there must have come an image describing where you might have gone wrong, that part of the image can you share?

Based on the first image which you shared, you are hard coding your codes.

The simplest way would be first define the uniques values in both groups separately for example start by df1\_patients\_unique

Then once you have created unique values for both df1 and df2 group, create an intersection between both groups using python’s set.intersection() function. This you can recall as patient in both groups.

Then to know leakage, just recall with len function from the previously recalled patient in both groups being greater than 0 (#boolean (true if there is at least 1 patient in both groups), which will give you the expected output.

Let me know if you still need help!!!

Regards  
DP

---

<div class="post-metadata">

**Author:** ![WhiteBlack](https://avatars.discourse-cdn.com/v4/letter/w/f9ae1b/32.png) [@WhiteBlack](https://community.deeplearning.ai/u/WhiteBlack)\
**Post date:** [January 17, 2024, 12:17pm UTC](https://community.deeplearning.ai/t/i-cant-understand-the-demand-of-c1-w1-assignment/546014/5 "2024-01-17T12:17:45Z")

</div>

thank you 😘! i will have a new try  
I had so many classes yesterday so my mind was confused, now i am clear to finish it
