Skip to content
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

DOC Fix typos in math in Target Encoder user guide #26584

Merged
merged 3 commits into from
Jun 16, 2023

Conversation

lucyleeow
Copy link
Member

@lucyleeow lucyleeow commented Jun 15, 2023

Reference Issues/PRs

What does this implement/fix? Explain your changes.

Fixes some typos in the math equation in Target Encoder section of the user guide.

Any other comments?

:math:`\sigma_i^2` is the variance of `y` with category :math:`i` and
:math:`\tau^2` is the global variance of `y`.

For continuous targets, the formulation is similar to binary classification:

.. math::
S_i = \lambda_i\frac{\sum_{k\in L_i}y_k}{n_i} + (1 - \lambda_i)\frac{\sum_{k=1}^{n}y_k}{n}
S_i = \lambda_i\frac{\sum_{k\in L_i}Y_k}{n_i} + (1 - \lambda_i)\frac{\sum_{k=1}^{n}Y_k}{n}
Copy link
Member Author

Choose a reason for hiding this comment

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

This was more opinionated, but changed to capital Y to match the equation for binary case and the Micci-Barreca paper.

cc @thomasjpfan

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! LGTM

@thomasjpfan thomasjpfan added the Quick Review For PRs that are quick to review label Jun 15, 2023
Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

Just a missing one. Thanks @lucyleeow

doc/modules/preprocessing.rst Show resolved Hide resolved
@glemaitre glemaitre merged commit 0800fb3 into scikit-learn:main Jun 16, 2023
24 checks passed
@glemaitre glemaitre added the To backport PR merged in master that need a backport to a release branch defined based on the milestone. label Jun 16, 2023
@glemaitre glemaitre added this to the 1.3 milestone Jun 16, 2023
@glemaitre
Copy link
Member

Thanks @lucyleeow LGTM.

@lucyleeow lucyleeow deleted the doc_targetencoder branch June 18, 2023 01:11
jeremiedbb pushed a commit to jeremiedbb/scikit-learn that referenced this pull request Jun 29, 2023
REDVM pushed a commit to REDVM/scikit-learn that referenced this pull request Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Quick Review For PRs that are quick to review To backport PR merged in master that need a backport to a release branch defined based on the milestone.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants