5

I am taking machine learning, and I have seen a few contour plots in the course.

It seems that I can't understand how to read this plot, I have tried looking it up in Wikipedia, but I don't even understand the first example (the figure on the right).

Another example is from the course:

enter image description here

The remark in the brackets say that it is easier to see that the function plotted is convex from the counter plot. but I don't see it at all.

What are those circles ? what is the meaning that the red x is in the inner circle (or even near its middle) ?

I would appreciate it if someone could please explain what information I should be able to read from the right drawing (the contour plot) and how ?

Belgi
  • 23,150

1 Answers1

5

The circles you see are level sets: the function $J$ is equal where the colors are the same, i.e. around each circle. The red X is, presumably, the point where $J$ attains its minimum.

If you've ever seen a topographic map, it is also a form of contour plot, where the function being plotted is the height of the ground.

From the plot you should be able to see that the function $J$ is "bowl-shaped" and therefore convex. Moreover, from the spacing you can see that the function increases quickly starting from the X and moving up-right or down-left, and slowly moving up-left or down-right.

user7530
  • 49,280
  • Thank you for your answer. Can you please explain how can you tell anything about the value of $J$ ? what is the meaning of the spacing ? how did you see it is "bowl-shaped"...I don't see how to get this information. What I understood for now is that the same color represents the same value, but nothing more – Belgi Oct 26 '13 at 17:13
  • Although there doesn't seem to be any indication in this particular plot, typically there is an understanding that the level sets are equally spaced: one circle shows $J=k$, the next $J=2k$, $J=3k$, and so forth. A good plot will tell you the value of $k$. To see it is bowl-shaped, visually the height of each ring: as you move out from the X, each ring is higher than the last. This assumes that the X is a minimum and not a maximum, information that is implicit but that a good plot will make explicit. – user7530 Oct 26 '13 at 17:18
  • See also http://en.wikipedia.org/wiki/Contour_line – user7530 Oct 26 '13 at 17:19