C1_W3_Lab02_Sigmoid_function_Soln how is the prediction made

Unable to understand how the predications on the graph are made when I clicked on a data point. For example if I click on (6,7) how is the prediction calculated given that we already have a Y value in the below graph

1 Like

What is the Y value for x=6 or x=7, in the blue graph? As far as I can see its 1, and according to the threshold between benign and malignant it belongs to the latter one.

1 Like

The ‘x’ value is used to calculate z, and then z is used to compute y (the sigmoid of z).

If the result is > 0.5, then it’s “malignant”.

Actually, the plot is shaded incorrectly. The blue and red zones should be split vertically (based on the ‘y’ value), not horizontally (based on ‘x’).

1 Like

it makes sense now, the blue circles should all fall under blue shade, How does the plot for threshold look in the case where the area for y > 0.5 is red and y <= 0.5 is blue?

1 Like

The markers are the truth data (the labels for the training set).

The line is the predictions.

In this example, some of the predictions are wrong. That’s part of what the figure shows.