dot-loss: Cross-validation loss

.lossR Documentation

Cross-validation loss

Description

Calculates mean cross-validated loss

Usage

.loss(y, fit, family, type.measure, foldid = NULL)

Arguments

y

response: vector of length n

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 lambda (output from .fit)

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 n, with entries from 1 to nfolds

Value

Returns list of vectors, one for each model.

Examples

NA


palasso documentation built on Sept. 30, 2024, 9:30 a.m.