Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Correct docstring definition for log_loss function #16037

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

Merged
merged 6 commits into from
Jan 14, 2020

Conversation

sidgupta234
Copy link
Contributor

@sidgupta234 sidgupta234 commented Jan 7, 2020

Reference Issues/PRs

Fixes #16026

What does this implement/fix? Explain your changes.

Corrects erroneous docstring under log_loss function.

@sidgupta234
Copy link
Contributor Author

@NicolasHug let me know if this looks merge-able!

@@ -2088,8 +2088,8 @@ def log_loss(y_true, y_pred, eps=1e-15, normalize=True, sample_weight=None,

This is the loss function used in (multinomial) logistic regression
and extensions of it such as neural networks, defined as the negative
log-likelihood of the true labels given a probabilistic classifier's
predictions. The log loss is only defined for two or more labels.
log-likelihood of the classfier given the true labels.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is helpful as a definition. I suppose we mean that log_loss(y_true, y_pred) is defined as the likelihood of a logistic model that returns y_pred probabilities for its training data y_true.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorporated in the pr.

@NicolasHug
Copy link
Member

I'm happy with @jnothman 's proposal

@NicolasHug
Copy link
Member

Thanks @sid21g , as you can see the CI isn't happy because you have some line-too-long issues. Please make sure everything fits under 79 characters.

Otherwise looks good!

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM otherwise, thanks @sid21g

@sidgupta234
Copy link
Contributor Author

let us know @jnothman if we can close this

@jnothman
Copy link
Member

Thanks @sid21g

@jnothman jnothman merged commit 54344b1 into scikit-learn:master Jan 14, 2020
thomasjpfan pushed a commit to thomasjpfan/scikit-learn that referenced this pull request Feb 22, 2020
panpiort8 pushed a commit to panpiort8/scikit-learn that referenced this pull request Mar 3, 2020
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

Successfully merging this pull request may close these issues.

possible error in user guide for log loss
3 participants