Skip to content

Commit bb8ef96

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent afc057e commit bb8ef96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

machine_learning/loss_functions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,7 @@ def kullback_leibler_divergence(y_true: np.ndarray, y_pred: np.ndarray) -> float
662662
kl_loss = y_true * np.log(y_true / y_pred)
663663
return np.sum(kl_loss)
664664

665+
665666
def root_mean_squared_error(y_true, y_pred):
666667
"""
667668
Root Mean Squared Error (RMSE)
@@ -700,7 +701,7 @@ def root_mean_squared_error(y_true, y_pred):
700701
"""
701702
if len(y_true) != len(y_pred):
702703
raise ValueError("Input arrays must have the same length.")
703-
y_true,y_pred = np.array(y_true), np.array(y_pred)
704+
y_true, y_pred = np.array(y_true), np.array(y_pred)
704705

705706
mse = np.mean((y_pred - y_true) ** 2)
706707
return np.sqrt(mse)

0 commit comments

Comments
 (0)