From d47295af4b0f350156742674832a8f2a56ddbed9 Mon Sep 17 00:00:00 2001 From: adamingas Date: Thu, 11 Jan 2024 22:31:52 +0000 Subject: [PATCH] format: fix line too long --- ordinalgbt/loss.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ordinalgbt/loss.py b/ordinalgbt/loss.py index bcf448b..4237284 100644 --- a/ordinalgbt/loss.py +++ b/ordinalgbt/loss.py @@ -181,7 +181,9 @@ def ordinal_logistic_nll(y_true: np.ndarray, y_preds: np.ndarray, theta: np.ndar # probabilities associated with the correct label label_probas = probas[np.arange(0, len(y_true)), y_true] label_probas = np.clip( - label_probas, a_min=np.finfo(float).eps, a_max=1 - len(theta) * np.finfo(float).eps + label_probas, + a_min=np.finfo(float).eps, + a_max=1 - len(theta) * np.finfo(float).eps ) # loss return -np.sum(np.log(label_probas))