In the final assignment of week 3, in utils.py file.

In Plot decision boundary, the decision boundary is given by as follows,

z[i,j] = sig(np.dot(map_feature(u[i], v[j]), w) + b)

From lectures, i thought w.x+b = 0 is decision boundary. But above definition looks like sigmoid(w.x + b) = 0 to plot the curve. However i tried both with and without sigmoid function. The curve output is different and with sigmoid function the decision boundary is better and capturing more data points inside it. Did i not understand the plotting function correctly or definition of z in above is made different. please explain…

Also in the end, it would also be better if someone can explain why did we calculate z over whole range of (u, v) values and how does plt.contour work… Thank you so much