Description Usage Arguments Examples
Generate cross-validated leave-one-out or leave-p-out test/training pairs.
The function leave-p-out
generates leave-p-out test/training pairs.
The function leave-one-out
is convenience function for the
common special case of leave-one-out cross-validation, p = 1
.
1 2 3 | crossv_lpo(n, size = 1L)
crossv_loo(n)
|
n |
A positive, scalar integer representing the number of observations (items to choose from). |
size |
A scalar integer representing the number of items to include in the training set. |
1 2 3 4 5 6 7 | # Example originally from modelr::crossv_mc
library("purrr")
# leave-on-out cross-validation
crossv_loo(10)
# leave-two-out cross-validation
crossv_lpo(10, size = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.