I’ve tried to search this forum but don’t see an answer for what I’m going to ask - which seems to indicate I’m missing something

at the bottom of this lab we’re given this x_train = np.array([0., 1, 2, 3, 4, 5]) y_train = np.array([0, 0, 0, 1, 1, 1]) w_in = np.zeros((1)) b_in = 0

we’re then asked to Click on ‘Run Logistic Regression’ to find the best logistic regression model for the given training data
*plt.close(‘all’) * addpt = plt_one_addpt_onclick( x_train,y_train, w_in, b_in, logistic=True)

with w_in and b zeroed then z = 0 for each example x, then g(z) = g(0.5) = 0 for each example x.
From those initial values of x_train, w_in, b_in I don’t get the results than map to the graph.

Not sure where I’m going wrong and any guidance is welcome. Thanks in advance!

This is the graph from the lab which looks fine and I’m not querying that. I just can’t get my head around how we go from: x_train = np.array([0., 1, 2, 3, 4, 5])
and z = 0 for all examples
and g(z) = 0.5 for all examples
to that graph

aha I see now. The chart before clicking the button does indeed have the line g(z) = 0.5
I mistakenly thought that any input into the sigmoid function would produce a similar S curve but it’s clear that’s not the case.

Thanks for the responsiveness especially over Christmas - it is very much appreciated! I hope you have a great rest of the holidays.