Supervised Learning: Week 3 : Classification # UNQ_C2

Based on the latest error message, I can see you have made some progress! Great work @26_Komal_Kamble!

However, the dj_db value is still incorrect, and I suspect it is due to a problem in your calculation of z_wb. I need you to check very very carefully if you have missed anything there. For example, z_wb is supposed to be accumulating some values as you loop over range(n), is it in your code that it is accumulating values?

You need to ask yourself these: how can I tell whether it is accumulating values or not? what does it look like in code? is it there in my code?

I am sharing this again:

Hello @26_Komal_Kamble,

I have not heard from you for a while. Just in case I have gone when you reply, from the grader’s report, UNQ_C4 and C6 were incorrect.


UNQ_C6 depends on UNQ_C3, so hopfully after you fixed C3, C6 will pass too.

UNQ_C4 also needs us to calculate f_wb, so perhaps it has a similar problem as C3?


@26_Komal_Kamble, I will go offline now. If you still have questions, I suggest you to open a new post and share the latest error Traceback there.

Good luck!


I’ll be on the look out for any additional question here to cover you, @rmwkwok .

1 Like

Thank you very much @Juan_Olano!! :slight_smile: :slight_smile:

This is the error that I’m getting now. Can u tell me what’s wrong? Please help me out!

Let me check all and I’ll get back to you shortly.

Hi @26_Komal_Kamble ,

Here are a few points that need attention:

  1. The code block structure is incorrect. The first ‘For’ statement is for looping through all examples, indexed by i to m. The second ‘For’ statement should be inside the first ‘For’ statement because we are working through each feature of an example, indexed by j to n.
  2. Please read the hints and try to understand what your code is required to do.
  3. please read Raymond’s link on indentation.
1 Like

Ohk thankyou for helping me out

Align loss_sum =0 with first for loop statement. Search for what is an indentation error.