The math of "Plot the model alongside the data"

Hello, I’m going through “C1_W1_lecture_nb_03_logistic_regression_model”, but stuck in the " Plot the model alongside the data" section.
It says:

We will draw a gray line to show the cutoff between the positive and negative regions. In other words, the gray line marks the line where 𝑧=𝜃∗𝑥=0.

I’m wondering what 𝑧 is here, and why 𝑧=𝜃∗𝑥=0 would give a line representing the cutoff between the positive and negative regions.

Thank you!

Ok I figured. This is because in logistic regression, y = 1/(1+e^(-z)). This boundary is y = 0.5, which corresponds to z = 0.

1 Like