10000 Why the raise ValueError happen when (y_true < 0) or (y_pred < 0) with log1p? · Issue #18477 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Why the raise ValueError happen when (y_true < 0) or (y_pred < 0) with log1p? #18477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
m-zakeri opened this issue Sep 28, 2020 · 1 comment
Closed

Comments

@m-zakeri
Copy link
m-zakeri commented Sep 28, 2020

Why the raise ValueError happen when (y_true < 0) or (y_pred < 0), while log1p is used which can handle negative numbers greater than -1?

Originally posted by @m-zakeri in #9963 (comment)

@NicolasHug
Copy link
Member

I think the reason we use log(1 + y) instead of log(y) is because we still want to allow y to be 0. But we still don't want y < 0.

Since this is a question and since I think it's now answered, I'll close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0