When you say “y_predict” do you mean y
or \hat{y}?
Do you mean “y_predict” takes on any value from 0
to 1
as the output of g(z)
or do you mean it takes on values of only 0
or 1
, like the output label?
When you say “y_predict” do you mean y
or \hat{y}?
Do you mean “y_predict” takes on any value from 0
to 1
as the output of g(z)
or do you mean it takes on values of only 0
or 1
, like the output label?
I understand the inclination to be precise, but does this distinction really matter in helping you understand the concept you were originally asking about? I worry that we’re getting lost in the weeds here and losing track of the bigger picture.
“y_predict” and “y_hat” are used interchangeably.
The predicted value is the output of sigmoid(), so it’s a real number between 0 and 1.
‘y’ typically denotes a labeled value in the data set, which will be 0 or 1.
Usage of specific variable name structures is highly inconsistent in the industry.
Hi Wendy,
I understand what you mean.
Yes I understand the concepts of linear regression and logistic regression.
I am a bit of a stickler for consistent and accurate mathematical description and application. Without that consistency it can become confusing and make it harder to grasp the concepts.
I think I can accept y_predict
as used by another poster as being the same thing as the output value from g(z)
.
Stephen
Thank you Wendy I will give that some thought…
Stephen
Yes, Wendy, you are correct.
I have thought more about this and I can see when b \gt 0, there must be at least one product from the remainder of z
, like w_j x_j^{(i)} that is less than 0
to make z
equal to 0
along the non-linear decision boundary. And this must mean that for smaller x_j^{(i)} inside the decison boundary the product will become more positive making the value of z
more positive and the output label y = 1
instead of y = 0
as for the circle.
Stephen,
I know what you are asking, I immediately have the same feeling when I view the video for the first time. Specifically, in Supervised Machine Learning: Regression and Classification Week 3 → Decision boundary @ 9:34:
I think it is a typo for ŷ in the graph in general. But it is also possible to have some model (trained by some special data) will have such an exact behavior like the graph.
So I would just ignore the 0 or 1 inside or outside the shape, just understand that the predict value will be different between inside and outside.
There is no typo.
Whether the 1’s or 0’s are inside the boundary or outside depends entirely on the features and labels in the training set, and the weight values that are learned.
Note that each weight can be any real value, either positive or negative.
Yes, you are correct now that I have thought through what @Wendy has explained.
Isn’t it a typo when \hat{y} is used to indicate an output label value of 0
or 1
when y
is the correct notation?
\hat{y} is a prediction from the model. It may or may not be correct.
‘y’ is the label applied to the example. Labels are assumed to be correct.
When you say \hat{y} is “…a prediction from the model…” do you mean it takes on the value 0
or 1
or do you mean it is g(z)
?
Around 1:51 in the Week 3 “Decision Boundary” video, Andrew indicates that y-hat takes logical values, 1 or 0.
That makes sense, since in general use, y-hat is the predicted value from a regression. For linear regression, it would be a real number. For logistic regression, it would be a classification.
I’m not sure whether Andrew is always consistent about his use of terminology. He tends to lecture in a very intuitive manner.