October 2018
Beginner to intermediate
676 pages
18h 30m
English
The previous screenshot only represents various contours of the Loss function for a given set of theta0 and theta1. We can also plot the optimal values of theta0 and theta1 on the same plot to represent minimum loss:
# Plot the minimum point(Theta at Minimum cost)plt.plot(theta[0], theta[1], 'rx', markersize=15, linewidth=2)plt.show()
Here is how the plot looks. The red cross position depicts the optimal theta that gives lowest error for this regression problem:

Read now
Unlock full access