d = original-predicted mse = mean((d)^2) mae = mean(abs(d)) rmse = sqrt(mse) R2 = 1-(sum((d)^2)/sum((original-mean(original))^2)) cat(" MAE:", mae, " ", "MSE:", mse, " ",