26
$\begingroup$

I'm talking about this puppy:

CrossValidated logo

It kinda looks like a heat-map or correlogram, but I would expect the other diagonal to be picked out in green, were that the case. (My expectations may be flawed. :)

I read the post by the logo's seeming designer, but that doesn't explain.

What kind of graph is it?

$\endgroup$
4
  • 8
    $\begingroup$ Look in the comments to the top answer in the thread you linked to: meta.stats.stackexchange.com/questions/269/…. It represents 5-fold cross-validation (green squares are test sets). I never knew until you asked. $\endgroup$
    – amoeba
    Jan 30, 2016 at 0:35
  • $\begingroup$ Thank you, but other than "it is represents 5-fold cross-validation scheme," I am unenlightened. In what way does it do so? (Apologies if I am not being clear: imagine the logo is a box plot, and I ask "what does a box plot represent" An answer I would like would explain graphical representation of median, IQR, etc.) That the actual logo does represent CrossValidated in some way is just something I assumed. :) $\endgroup$
    – Alexis
    Jan 30, 2016 at 0:46
  • $\begingroup$ @amoeba when I started my answer I didn't see you had answered in comments; if you want to post an answer, that would probably be a good thing. $\endgroup$
    – Glen_b
    Jan 30, 2016 at 1:32
  • $\begingroup$ @Glen_b: No problem at all; your answer includes everything I would have written and more. +1. It's funny, I never realized that our logo actually represents cross-validation; never thought about its meaning really. So great question, +1 to Alexis too. $\endgroup$
    – amoeba
    Jan 30, 2016 at 19:58

1 Answer 1

25
$\begingroup$

I took it to be a representation of the name CrossValidated since it looks to me like a stylized depiction of a five-fold cross-validation. (Presumably the five-fold was chosen for its look rather than any suggestion that five-fold cross-validation was particularly representative.)

If that impression is accurate*, in each "row" of the image, the pale green block would represent the validation-set (test-set) for that fold.

The fact that it also sort of looks leaf-like I find rather attractive, personally.

* Oops, I see now that amoeba had already indicated this in comments, with a link. Nice to know my impression was correct.

As for what k-fold cross-validation is, a detailed explanation would really be a question for the main site. Besides the Wikipedia link above, Rob Hyndman gives some discussion on his blog; however, I suppose a very brief outline - sufficient to motivate the appearance of the logo - is not out of order.

In order to properly assess the out of sample behavior of some procedure (very important if you're interested in prediction, say, but also important in estimation because we want to generalize to the population, which is almost entirely outside our sample), we hold out some of our data from the data we use for estimation, in order to assess/validate (a.k.a. "test") the performance of the model on that part (by any criterion of interest; mean square error for example). In k-fold cross validation we do this by dividing the data into $k$ equal pieces and performing $k$ such steps of estimation-then-validation.

If we are trying to see how well we'd predict some additional data, or if we want to compare the performance of two possibly very different models, for example, this avoids issues of overfitting (because we see how well the model does on data we didn't use in the fitting); we don't need to account for the fact that some models may have many more parameters for example, since they don't get an advantage from that when looking outside the data used in the fitting. [There's much more to be said but this isn't the place for it, and there are certainly better people to explain it than me.]

So anyway if we divide our data into five equal-sized pieces (first putting the observations in random order) and hold one of those 5 pieces out, we would estimate on 80% of the data and test (validate) on the remaining 20%, but we'd do that five times, where each fifth would serve as the test set once. A diagram of the first two rounds of a 5-fold cross validation would look something like this:

enter image description here

... and so on for a further three rounds. (The name of our chat site -- "Ten Fold" -- also relates to cross-validation. Ten fold cross validation is common.)

[Note that a number of common regression diagnostics correspond to what you'd get with "leave-one-out-cross-validation" (LOOCV), which is $n$-fold cross validation, so if you look at common regression diagnostics that modern packages tend to provide, you have in effect already done a bit of cross-validation.]

Hopefully the relationship of the above diagram to the first two "rows" of the site logo is clear.

Diagrams like this are often found in discussions of cross-validation. See, for example, figure 5.5, p181 of James et al "Introduction to Statistical Learning" (pdf of the 6th printing is downloadable from the website of the first author, here), which also depicts five-fold cross validation. (Reading pages 175-184 gives a nice simple introduction to some of these ideas.)

$\endgroup$
9
  • 2
    $\begingroup$ +1. Any idea why the colors are different within the sides of the green diagonal? If I am not mistaken there are two tons of blue. $\endgroup$ Jan 31, 2016 at 11:49
  • 5
    $\begingroup$ @Andre They're both the same hue (127), just slightly on the blue side of blue-green but with different saturation (color intensity/greyness) and luminance (lightness/darkness of shade). I don't think there's anything intended by that difference in intensity and brightness. If you look at the prototype versions they don't have that change across the diagonal. I expect it was done simply because it looks better that way. $\endgroup$
    – Glen_b
    Jan 31, 2016 at 12:18
  • 1
    $\begingroup$ It occurs to me that an interesting question is why cross validation is customarily depicted this way. I think of data by default as being arrayed vertically (going down the rows of the data matrix). So it would seem most intuitive to me for cv to have columns w/ a diagonal of test sets, not rows. $\endgroup$ Feb 1, 2016 at 4:12
  • 4
    $\begingroup$ @gung Perhaps because in the diagram, moving down represents successive steps in the cross-validation algorithm. People also tend to think of steps in an algorithm or recipe being written list-like down the page rather than across the page and it's easier to transpose the expected direction with data than it is with algorithms. $\endgroup$
    – Glen_b
    Feb 1, 2016 at 4:38
  • 2
    $\begingroup$ Thank you, Glen_b... so the image represents a visual schema or plan, more than a visual analysis. Cool. $\endgroup$
    – Alexis
    Feb 1, 2016 at 18:59
  • 1
    $\begingroup$ @Alexis I wish I could have thought of such a succinct description - I'd like to have opened with that. $\endgroup$
    – Glen_b
    Feb 1, 2016 at 20:43
  • 2
    $\begingroup$ @gung Perhaps it's a long shot, but in addition to what Glen_b says, the horizontal bar motif is common in stack exchange logos (e.g., serverfault, code review, stack exchange, personal finance and money, almost stackoverflow). Or maybe this pattern is simply noise I'm mistaking for signal. $\endgroup$ Feb 2, 2016 at 21:23
  • $\begingroup$ @buckminster Oh, there's definitely a horizontal bar motif in a number of logos -- including the StackExhange logo itself $\endgroup$
    – Glen_b
    Feb 2, 2016 at 22:49
  • $\begingroup$ The logo could also represent a variance-covariance matrix that's been flipped around (assuming the green squares represent the variance values). $\endgroup$
    – RobertF
    Feb 8, 2016 at 15:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .