Skip to content

Commit 9ae7622

Browse files
committed
Adding RMSE - Root Mean Squared Error Loss function for ML Evaluation
1 parent 6e05e31 commit 9ae7622

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

machine_learning/loss_functions.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,11 +666,18 @@ def root_mean_squared_error(y_true, y_pred):
666666
"""
667667
Root Mean Squared Error (RMSE)
668668
669+
Root Mean Squared Error (RMSE) is a standard metric used to evaluate the accuracy of regression models.
670+
It measures the average magnitude of the prediction errors, giving higher weight to larger errors due to squaring.
671+
The RMSE value is always non-negative, and a lower RMSE indicates better model performance.
672+
669673
RMSE = sqrt( (1/n) * Σ (y_true - y_pred) ^ 2)
670674
671-
Args:
675+
Reference: https://en.wikipedia.org/wiki/Root_mean_square_deviation
676+
677+
Parameters:
672678
y_pred: Predicted Value
673679
y_true: Actual Value
680+
674681
Returns:
675682
float: The RMSE Loss function between y_Pred and y_true
676683

0 commit comments

Comments
 (0)