# What is decision boundary doing here?

I don’t understand the difference between the- 0.5 threshold border and the orange line which is the decision boundary… isn’t the decision boundary supposed to divide the positive and negative regions, im really confused, then why is the vertical line doing its job here, it’s clear that the vertical line is seperating the two regions, why is that, then what is the importance of the orange line i.e. the decision boundary…

Hi @staticgeek the orange line is a linear function using regression model, while the blue line shows the sigmoid function, both are able to make predictions but in different way, the model classify as bening or malignant depending on the size of the tumor, the vertical line is using the sigmoid function to classify the tumor. Overall the grahs shows you the difference between using logistic regression and linear regression for binary classification

I hope this helps

3 Likes

Hello, @staticgeek,

Only the vertical line is the decision boundary. The orange line is not.

We do not need the orange line to show the decision boundary. I would just ignore the orange line for the purpose of identifying decision boundary.

Cheers,
Raymond

3 Likes

ok thanks

1 Like

thanks

1 Like

I think the decision boundary in this figure is drawn wrong. It should be a horizontal line at 0.5 units.

The orange line is not the boundary, it is just the linear plot of z.

1 Like

As @TMosh says, the orange line is not the decision boundary, but just a plot of z.

To clarify why the decision boundary is vertical in the figure and not horizontal:
This is a simplified example that is trying to estimate whether a tumor is benign or malignant based solely on tumor size (the x axis). The y axis represents the categorical result (1 = malignant, 0 = benign). The vertical decision boundary is showing us that (as far as we can tell from only tumor size), tumors greater than the corresponding tumor size are likely to be malignant and those smaller than that size are likely to be benign.

2 Likes

If we want to connect everything (including the orange line) up, here is one way:

The boundary is \text{probability} = y = 0.5, for that we need z = 0, and in order to draw the boundary (with respect to tumor size, as Wendy explained), we need to solve z = 0.83x + (-2.21) = 0, which is actually looking for the x-intercept. Since it is the x-intercept, we see it is where the orange line and the vertical line cross each other.

Cheers,
Raymond