@@ -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,40 @@ 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
+
240
+ In terms of accuracy, LOO often results in high variance as an estimator for the
241
+ test error. Intuitively, since *n - 1 * of
242
+ the *n * samples are used to build each model, models constructed from folds are
243
+ virtually identical to each other and to the model built from the entire training
244
+ set.
245
+
246
+ However, if the learning curve is steep for the training size in question,
247
+ then 5- or 10- fold cross validation can overestimate the generalization error.
248
+
249
+ As a general rule, most authors, and empirical evidence, suggest that 5- or 10-
250
+ fold cross validation should be preferred to LOO.
251
+
252
+
253
+ .. topic :: References:
254
+
255
+ * http://www.faqs.org/faqs/ai-faq/neural-nets/part3/section-12.html
256
+ * T. Hastie, R. Tibshirani, J. Friedman, `The Elements of Statistical Learning
257
+ <http://www-stat.stanford.edu/~tibs/ElemStatLearn> `_, Springer 2009
258
+ * L. Breiman, P. Spector `Submodel selection and evaluation in regression: The X-random case
259
+ <http://digitalassets.lib.berkeley.edu/sdtr/ucb/text/197.pdf> `_, International Statistical Review 1992
260
+ * R. Kohavi, `A Study of Cross-Validation and Bootstrap for Accuracy Estimation and Model Selection
261
+ <http://www.cs.iastate.edu/~jtian/cs573/Papers/Kohavi-IJCAI-95.pdf> `_, Intl. Jnt. Conf. AI
262
+ * R. Bharat Rao, G. Fung, R. Rosales, `On the Dangers of Cross-Validation. An Experimental Evaluation
263
+ <http://www.siam.org/proceedings/datamining/2008/dm08_54_Rao.pdf> `_, SIAM 2008
264
+ * G. James, D. Witten, T. Hastie, R Tibshirani, `An Introduction to Statitical Learning
265
+ <http://www-bcf.usc.edu/~gareth/ISL> `_, Springer 2013
266
+
267
+
234
268
Leave-P-Out - LPO
235
269
-----------------
236
270
0 commit comments