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

Skip to content

Simplify estimate gaussian covariances diag #30414

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

Conversation

ogrisel
Copy link
Member

@ogrisel ogrisel commented Dec 5, 2024

A quick efficiency improvement spotted by @mekleo in #30382.

I think this can go in independently of the decided resolution of the numerical stability problem reported in #30382.

@ogrisel ogrisel force-pushed the simplify-_estimate_gaussian_covariances_diag branch from 553fc3d to 67c180d Compare December 5, 2024 16:35
Copy link

github-actions bot commented Dec 5, 2024

✔️ Linting Passed

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

Generated for commit: f31c5dd. Link to the linter CI: here

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.

For future reviewers, the means arg receives means computed as means = np.dot(resp.T, X) / nk[:, np.newaxis], so avg_X_means is precisely means**2.

@jeremiedbb
Copy link
Member

Not sure it requires a changelog entry since it's internal detail but now that it's here.

@ogrisel ogrisel force-pushed the simplify-_estimate_gaussian_covariances_diag branch from 67c180d to f31c5dd Compare December 5, 2024 17:51
@ogrisel
Copy link
Member Author

ogrisel commented Dec 5, 2024

@mekleo I amended my commit to credit co-authorship (and similarly in the changelog entry). Please let us know if this is fine with you.

@mekleo
Copy link
Contributor

mekleo commented Dec 5, 2024

@mekleo I amended my commit to credit co-authorship (and similarly in the changelog entry). Please let us know if this is fine with you.

Great, thank you Olivier. Thanks, Jeremie for the speedy review.

Copy link
Contributor

@OmarManzoor OmarManzoor 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 @mekleo and @ogrisel

@OmarManzoor OmarManzoor merged commit 507c432 into scikit-learn:main Dec 6, 2024
30 checks passed
@ogrisel ogrisel deleted the simplify-_estimate_gaussian_covariances_diag branch December 6, 2024 14:42
virchan pushed a commit to virchan/scikit-learn that referenced this pull request Dec 9, 2024
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.

4 participants