Skip to content

Commit

Permalink
format: fix line too long
Browse files Browse the repository at this point in the history
  • Loading branch information
adamingas committed Jan 11, 2024
1 parent 9df7284 commit d47295a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ordinalgbt/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d47295a

Please sign in to comment.