Skip to content

ENH add sample_weight and fit_intercept to Cython enet_coordinate_descent - #31375

Open
lorentzenchr wants to merge 6 commits into
scikit-learn:mainfrom
lorentzenchr:cd_weighted
Open

lorentzenchr wants to merge 6 commits into
scikit-learn:mainfrom
lorentzenchr:cd_weighted

Conversation

@lorentzenchr

@lorentzenchr lorentzenchr commented May 16, 2025 •

Copy link
Copy Markdown
Member

Reference Issues/PRs

A step towards #16637.

What does this implement/fix? Explain your changes.

This adds the arguments sample_weight and X_mean to def enet_coordinate_descent defined in Cython.

Any other comments?

The performance impact on the standard case should be minimal, only a few more if conditions, but no actual additional computation (additional computations only in the new code path).

@github-actions

github-actions Bot commented May 16, 2025 •

Copy link
Copy Markdown

✔️ Linting Passed

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

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

* np.square(X).sum(axis=0) consumed a complete copy of X. This is now avoided at the expense of more explicit for-loops.

This branch has not been deployed

No deployments
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.

1 participant