Estimates a risk for a given set of predictions and loss function.

risk(pred, observed, loss = loss_squared_error, weights = NULL)

Arguments

pred

A vector of predicted values.

observed

A vector of observed values.

loss

A loss function. For options, see loss_functions.

weights

A vector of weights.