# C1_W3_Lab04_LogisticLoss_Soln cost vs params

Reg the graph

Wondering if there is something worth noting from these graphs between w, b vs cost and w, b vs log(cost), I couldn’t understand the reason behind plotting the graph between w, b vs log(cost)

1 Like

You can rotate the images and see where the minimum is located, and observe whether it is easier to find the minimum with or without the log scaling.

2 Likes

In my opinion, the log(Cost) graph shows the true nature of function as convex or without plateaus or local minima. Observe the scale on log( cost )axis. It is much smaller (+3 to -5) as compared to scale on cost axis (+20 to 0). This means that log(cost) axis actually zooms in to show the lowest cost bottom of the bowl( It is not a bowl but a convex shape). Try rotating thr log(Cost graph and you will see that it is in the shape of a plain paper pinched in the middle and that pinch line is also sloping

2 Likes

“the log(Cost) graph shows the true nature of function as convex or without plateaus or local minima” Does this mean the cost graph may contain plateaus or local minima? I thought the whole reason behind avoiding the mean squared error function and choosing the Loss function for logistic regression is to avoid plateaus or local minima isn’t?

You are correct, the squared error cost function will have local minima if it is used for logistic regression.

The log() plot doesn’t change the inherent shape of the squared-error cost function, because log is a monotonic function. Maybe it makes the visualization easier in this assignment, but that’s just for show.

Classification uses a completely different cost calculation method, which is convex.