Calculate loss from predicted and observed values
.loss(y, x, family, type.measure, foldid = NULL, grouped = TRUE)
observed values: numeric vector of length \(n\)
predicted values: numeric vector of length \(n\)
character "gaussian"
, "binomial"
, "poisson"
,
"mgaussian"
, or "multinomial"
(to implement: "cox"
)
character "deviance"
, "mse"
, "mae"
, "class"
,
or "auc"
fold identifiers:
integer vector of length \(n\),
or NULL
logical (for "cox"
only)
NA
#> [1] NA