R/accuracy_metrics.R
square_loss.Rd
Square loss
square_loss(y, y_hat)
Vector of observations or ground-truths.
Vector of predictions.
The vector of square errors between y and y_hat.
y
y_hat
square_loss(c(2.3, 4.2, 1.8), c(2.2, 4.6, 1.7)) #> [1] 0.01 0.16 0.01