C1_W2_Lab02 Plot Not Working

In C1_W2_Lab02_Multiple_Variable_Soln the last cell doesn’t seem to be working properly:

My questions are:

  1. Shouldn’t the left side show a scatter plot?
  2. Shouldn’t the right side also show a scatter plot?
  3. It says that “Cost is still declining” which is not inspiring. Isn’t a declining cost a good thing?

Thanks in advance!

Not a scatter plot, those plots are a line graph that shows the cost history vs the number of iterations.

“Not inspiring” because ideally the cost would settle to a minimum and no longer decrease.

1 Like

Hello @N_R,

Welcome to our community!

Although this is not part of your questions, one key thing about this pair of graphs is to show you even though it looked plateaued on the left graph, the right graph, which is a zoom-in view for the left graph (check that the x-axis of the right graph starts from 100), showed that it was indeed decreasing.

I think it said “not inspiring” because of the following comparisons:
image
that even though the cost kept declining (which is good as you said), the predictions end up quite different from the targets. We wanted the predictions to be better.

plt.plot by default gives you lines. plt.scatter gives you scatter plots.

Cheers,
Raymond

1 Like

Ah, now I see.
I thought the blue lines in the left plot were just the borders!
Thanks for explaining the scaling change - I didn’t pick up on that.
I ended up making an intervening plot to visualize it.

And thanks for the prediction and plotting info as well. The fog has lifted. :smile:

It’s good! Actually other learners had asked about the plots, and I think next time it will be useful to share the link to your intervening plot if there is a new question about these plots again. I am going to bookmark your post. Thank you, @N_R!

Raymond

1 Like