Cost vs iteration plot, optional lab: Optional lab: C1_W2_Lab02_Multiple_Variable

Can anyone help me understand the difference between two plots ?
and what does this line mean

ax2.plot(100 + np.arange(len(J_hist[100:])), J_hist[100:])

The plot on the right is a zoomed-in region of the lower-right quadrant of the left plot.
It shows that the cost is still decreasing over the last few hundred iterations.

That code generates indices for the range of cost values starting from index100 and continuing to the end of the data.

1 Like