Skip to content

Commit 658e3ab

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

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

machine_learning/loss_functions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,6 @@ def kullback_leibler_divergence(y_true: np.ndarray, y_pred: np.ndarray) -> float
663663
return np.sum(kl_loss)
664664

665665

666-
667666
def root_mean_squared_error(y_true: np.ndarray, y_pred: np.ndarray) -> float:
668667
"""
669668
Calculate the Root Mean Squared Error (RMSE) between ground truth and predicted values.
@@ -705,7 +704,6 @@ def root_mean_squared_error(y_true: np.ndarray, y_pred: np.ndarray) -> float:
705704
return np.sqrt(mse)
706705

707706

708-
709707
def log_cosh_loss(y_true: np.ndarray, y_pred: np.ndarray) -> float:
710708
"""
711709
Calculate the Log-Cosh Loss between ground truth and predicted values.
@@ -751,6 +749,7 @@ def log_cosh_loss(y_true: np.ndarray, y_pred: np.ndarray) -> float:
751749
loss = np.logaddexp(errors, -errors) - np.log(2)
752750
return np.mean(loss)
753751

752+
754753
if __name__ == "__main__":
755754
import doctest
756755

0 commit comments

Comments
 (0)