C1_W3 logistic regression(syntax error?)

I cannot understand why there is a syntax error
Please guide me

Hello @Muhammed_sahal, the cause can be from the previous lines. For example, check if you have any imbalanced brackets in previous lines.

1 Like

@Muhammed_sahal Is the error resolved?

Yes but it shows z is not defined.

So, did you define z? did you define the small letter z?

Z_wb is for sigmoid function,right?.Nothing as in a parameter?

I am not sure what you mean. But if you did not define z, then you cannot use its value. Doesn’t this make sense?

Where am I making a mistake?
Please guide me

The mistake is, you are using the variable z without first defining it. Please check out the hint. The hint never uses z.

@Muhammed_sahal,

Read the description about the exercise that is right above the exercise’s code cell.

Check out the hints, and don’t miss out the small blue hint buttons. Read the hints and compare with the description to understand how you should translate the description into code.

This is your assignment and this is exactly the part you need to spend time on - understanding the description, the hints and writing your own code.

Since the error for this thread has been solved. I am closing this thread. Please open a new one if you have a new question.

Raymond


Example of some small, blue hints buttons.