.loss {palasso}R 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


[Package palasso version 0.0.9 Index]