.loss | R Documentation |
Calculates mean cross-validated loss
.loss(y, fit, family, type.measure, foldid = NULL)
y |
response:
vector of length |
fit |
matrix with one row for each sample
("gaussian", "binomial" and "poisson"),
or one row for each fold (only "cox"),
and one column for each |
family |
model family: character "gaussian", "binomial", "poisson", or "cox" |
type.measure |
... loss function: character "deviance", "mse", "mae", "class", or "auc" |
foldid |
fold identifiers:
vector of length |
Returns list of vectors, one for each model.
NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.