View source: R/cv_log_contrast.R
This function is to be called after calling sparse_log_contrast
.
It performs nfold
-fold cross validation.
1 2 3 4 5 6 7 8 | cv_sparse_log_contrast(
fit,
Z,
y,
folds = NULL,
nfolds = 5,
summary_function = stats::median
)
|
fit |
output of |
Z, y |
same arguments as passed to |
folds |
a partition of |
nfolds |
number of folds for cross-validation |
summary_function |
how to combine the errors calculated on each observation within a fold (e.g. mean or median) |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.