Skip to contents

Extraction of the model fits is only possible if these have been saved as a part of the “cv” object, which is not the case by default. See the argument keep_fits in ?cv.

Usage

extract_fits(x, ...)

Arguments

x

A cv-object.

...

Currently not used.

Value

A param_table. Besides the model fits, it will also have a column containing the folds.

See also

Examples

mm <- c(lm =    model(lm(Sepal.Width ~ ., iris)), 
        if (require(rpart)) model(rpart(Sepal.Width ~ ., iris), label = "rpart"))
#> Loading required package: rpart
mycv <- cv(mm, keep_fits = TRUE)
extract_fits(mycv)
#>        folds   lm   rpart
#> 1  <int>[15] <lm> <rpart>
#> 2  <int>[15] <lm> <rpart>
#> 3  <int>[15] <lm> <rpart>
#> 4  <int>[15] <lm> <rpart>
#> 5  <int>[15] <lm> <rpart>
#> 6  <int>[15] <lm> <rpart>
#> 7  <int>[15] <lm> <rpart>
#> 8  <int>[15] <lm> <rpart>
#> 9  <int>[15] <lm> <rpart>
#> 10 <int>[15] <lm> <rpart>