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

Skip to content

DOC move d2_log_loss_score in the classification metrics section #28938

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 7 commits into from
May 6, 2024

Conversation

OmarManzoor
Copy link
Contributor

Reference Issues/PRs

Fixes #28933

What does this implement/fix? Explain your changes.

  • Moves the documentation for D2 log loss score in the correct Classification metrics section
  • Also adds d2_log_loss_score in the specified lists of the classification metrics in the model evaluation document.

Any other comments?

CC: @jeremiedbb @lorentzenchr

Copy link

github-actions bot commented May 3, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 41e4a87. Link to the linter CI: here

Comment on lines 1993 to 2004
D2 log loss score
-----------------

The :func:`d2_log_loss_score` function implements the special case
of D² with the log loss, see :ref:`log_loss`, i.e.:

.. math::

\text{dev}(y, \hat{y}) = \text{log_loss}(y, \hat{y}).

The :math:`y_{\text{null}}` for the :func:`log_loss` is the per-class
proportion.
Copy link
Member

Choose a reason for hiding this comment

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

In regression metrics, we have a section about D2 scores in general and then subsections for each specific D2 score, see doc. Since we plan to add D2_brier_score_loss as well (#20943 (comment)), I think we should adopt the same structure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wouldn't that look better when we also add D2_brier_score_loss? So maybe we could integrate the structure with that PR?

Copy link
Member

Choose a reason for hiding this comment

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

The thing is that in its current form, this PR adds a section with terms that are not defined yet, like what's a D2 score, how's y_null related to the score. That's why I think we need to have the D2 introduction paragraph in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay sounds good.

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @OmarManzoor

@jeremiedbb
Copy link
Member

jeremiedbb commented May 3, 2024

@OmarManzoor please also add d2_log_loss_score in test_public_functions.py, I just remembered that we forgot to do it in the initial PR

@adrinjalali adrinjalali merged commit ff3ad59 into scikit-learn:main May 6, 2024
30 of 31 checks passed
@OmarManzoor OmarManzoor deleted the fix_doc_d2_log_loss branch May 6, 2024 09:28
@OmarManzoor OmarManzoor added this to the 1.5 milestone May 15, 2024
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request May 20, 2024
@jeremiedbb jeremiedbb mentioned this pull request May 20, 2024
14 tasks
jeremiedbb pushed a commit that referenced this pull request May 21, 2024
)

Co-authored-by: Omar Salman <omar.salman@arbisoft>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC D2_log_loss_score is in wrong section
4 participants