
K-fold partition plus CV score (Geron Ch 2, morie.fn hmkfd)
Source:R/geron_w4b_native.R
morie_geron_kfold.RdK-fold partition plus CV score (Geron Ch 2, morie.fn hmkfd)
Value
List with cv_score, fold_scores, train_indices, test_indices, fold_sizes, estimate, n, method.
Examples
morie_geron_kfold(X = c(1, 2, 3, 4, 5, 6, 7, 8), y = c(1, 2, 3, 4, 5, 6, 7, 8), k = 3L)
#> $cv_score
#> [1] 1
#>
#> $fold_scores
#> [1] 1 1 1
#>
#> $fold_sizes
#> [1] 3 3 2
#>
#> $se
#> [1] 0
#>
#> $train_indices
#> $train_indices[[1]]
#> [1] 4 5 6 7 8
#>
#> $train_indices[[2]]
#> [1] 1 2 3 7 8
#>
#> $train_indices[[3]]
#> [1] 1 2 3 4 5 6
#>
#>
#> $test_indices
#> $test_indices[[1]]
#> [1] 1 2 3
#>
#> $test_indices[[2]]
#> [1] 4 5 6
#>
#> $test_indices[[3]]
#> [1] 7 8
#>
#>
#> $K
#> [1] 3
#>
#> $estimate
#> [1] 1
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "K-fold partition and cross-validated score"
#>