@@ -165,7 +165,7 @@ validation strategies.
165
165
K-fold
166
166
------
167
167
168
- :class: `KFold ` divides all the samples in math:`k ` groups of samples,
168
+ :class: `KFold ` divides all the samples in : math: `k` groups of samples,
169
169
called folds (if :math: `k = n`, this is equivalent to the *Leave One
170
170
Out * strategy), of equal sizes (if possible). The prediction function is
171
171
learned using :math: `k - 1 ` folds, and the fold left out is used for test.
@@ -231,6 +231,41 @@ not waste much data as only one sample is removed from the learning set::
231
231
[0 1 2] [3]
232
232
233
233
234
+ Potential users of LOO for model selection should weigh a few known caveats.
235
+ When compared with *k *-fold cross validation, one builds *n * models from *n *
236
+ samples instead of *k * models, where *n > k *. Moreover, each is trained on *n - 1 *
237
+ samples rather than *(k-1)n / k *. In both ways, assuming *k * is not too large
238
+ and *k < n *, LOO is more computationally expensive than *k *-fold cross validation.
239
+ Typically *k * should be between 5 and 10.
240
+
241
+ In terms of accuracy, LOO often results in poor estimation of the test error,
242
+ since it overfits to the training data. Intuitively, since *n - 1 * of the *n *
243
+ samples are used to build each model, models constructed from folds are virtually
244
+ identical to each other and to the model built from the entire training set.
245
+
246
+ In contrast, it can also be shown that if the learning curve has a steep slope at
247
+ the training size in question, then 5- or 10- fold cross validation tends to
248
+ overestimate the generalization error.
249
+
250
+ As a general rule, most authors and empirical evidence suggest that 5- or 10-
251
+ fold cross validation is preferred to LOO.
252
+
253
+
254
+ .. topic :: References:
255
+
256
+ * http://www.faqs.org/faqs/ai-faq/neural-nets/part3/section-12.html
257
+ * T. Hastie, R. Tibshirani, J. Friedman, `The Elements of Statistical Learning
258
+ <http://www-stat.stanford.edu/~tibs/ElemStatLearn> `_, Springer 2009
259
+ * L. Brieman, P. Spector `Submodel selection and evaluation in regression: The X-random case
260
+ <http://digitalassets.lib.berkeley.edu/sdtr/ucb/text/197.pdf> `_, International Statistical Review 1992
261
+ * R. Kohavi, `A Study of Cross-Validation and Bootstrap for Accuracy Estimation and Model Selection
262
+ <http://www.cs.iastate.edu/~jtian/cs573/Papers/Kohavi-IJCAI-95.pdf> `_, Intl. Jnt. Conf. AI
263
+ * R. Bharat Rao, G. Fung, R. Rosales, `On the Dangers of Cross-Validation. An Experimental Evaluation
264
+ <http://www.siam.org/proceedings/datamining/2008/dm08_54_Rao.pdf> `_, SIAM 2008
265
+ * G. James, D. Witten, T. Hastie, R Tibshirani, `An Introduction to Statitical Learning
266
+ <http://www-bcf.usc.edu/~gareth/ISL> `_, Springer 2013
267
+
268
+
234
269
Leave-P-Out - LPO
235
270
-----------------
236
271
0 commit comments