`nmse()` computes the Normalized Mean Squared Error between the output of a regression model and the actual values of the target.
Details
The Normalized Mean Squared error is defined as:
$$NMSE=MSE/((N-1)*var(target))$$
where MSE is the Mean Squared Error.
Examples
y <- 1:10
y_pred <- y+rnorm(10)
nmse(y,y_pred)
#> [1] 0.04578627