Computes the Root Mean Squared Error (RMSE), a widely used metric for evaluating the accuracy of predictions in regression tasks. The formula is given by $$RMSE = \sqrt{\frac{1}{n}\sum_{i=1}^{n}\left(y_{i}-\hat{y}_{i}\right)^{2}}$$
RMSE(predicted, observed)
a the Root Mean Squared error calculated by the formula in the description.
A vector of predicted values \(\hat{\mathbf{y}}\).
A vector of observed values \(\mathbf{y}\).