Description Usage Arguments Details See Also Examples
Customise cross validation pairs of training and test data for pipelearner
object. By default, a single cross validation pair will be created with a
random 80
testing. learn_cvpairs
allows this to be customised through the use of
a function that takes a data.frame
as input and returns a
data.frame
with three columns: train
, test
, and
.id
. train
and test
must be list-columns of
resample
objects, and .id
is an atomic vector of
unique values.
1 | learn_cvpairs(pl, .f, ...)
|
pl |
pipelearner object. See |
.f |
function like |
... |
additional parameters to be passed to |
Will expect a pipelearner object, but will also accept a data frame for the
parameter pl
. In the case that a data frame is used, it will first
coerce it to a pipelearner object via pipelearner
.
Example functions that can be used for argument .f
:
crossv_mc
, crossv_kfold
1 2 3 | # Five-fold cross validation
pl <- pipelearner(mtcars)
learn_cvpairs(pl, crossv_kfold, k = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.