View source: R/loss_functions.R
risk | R Documentation |
Estimates a risk for a given set of predictions and loss function.
risk(pred, observed, loss = loss_squared_error, weights = NULL)
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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.