Estimates the cross-validated risk for a given learner and evaluation function, which can be either a loss or a risk function.

cv_risk(learner, eval_fun = NULL, coefs = NULL)

Arguments

learner

A trained learner object.

eval_fun

A valid loss or risk function. See loss_functions and risk_functions.

coefs

A numeric vector of coefficients.