Estimates a risk for a given set of predictions and loss function.
risk(pred, observed, loss = loss_squared_error, weights = NULL)
A vector of predicted values.
A vector of observed values.
A loss function. For options, see loss_functions.
A vector of weights.