Facing problem in week 3 graded assignment Logistic regression

Hello everyone!!

I am getting an ‘Assertion error‘ in week 3 graded assignment Logistic regression. I am getting the expected result but an error is also coming with it. I think it is for the function ‘compute_cost_test‘. Can anyone help me to fix this error or can say that why this is coming in the Coursera Lab class ?

Hello @Pritikana,

When the message said “got: nan”, it means that your compute_cost function returned a nan which cannot be correct, so you need to double check your function. Why did it return nan?

Have you made any change to the computer_cost_test function? If not, it should be fine because the test has been passed by many learners.

Cheers,
Raymond

Because your code is failing one of the test cases.

Thank you. I have re-checked it. And I got the point. Now it is working properly.

2 Likes