Skip to content

[FEA] Implement kfold.#7296

Merged
rapids-bot[bot] merged 24 commits intorapidsai:mainfrom
trivialfis:fea-kfold-rebase
Oct 31, 2025
Merged

[FEA] Implement kfold.#7296
rapids-bot[bot] merged 24 commits intorapidsai:mainfrom
trivialfis:fea-kfold-rebase

Conversation

@trivialfis
Copy link
Copy Markdown
Member

@trivialfis trivialfis commented Oct 2, 2025

#7163 rebased onto branch-25.12.

Closes #7088

Continuing the previous PR:

  • I have confirmed that the document from the base class get_n_splits is correctly inherited for the KFold.
  • I did not add the StratifiedKFold to the Sphinx doc as it did not build successfully. And as previously suggested, changing the stratified kfold should not be bundled into this PR.
  • Added a more precise test for the fold size.

todos

@trivialfis trivialfis added feature request New feature or request 2 - In Progress Currenty a work in progress non-breaking Non-breaking change labels Oct 2, 2025
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Oct 2, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the Cython / Python Cython or Python issue label Oct 2, 2025
@csadorf
Copy link
Copy Markdown
Contributor

csadorf commented Oct 9, 2025

@trivialfis Please let us know when this is ready for review. Thank you!

@trivialfis trivialfis marked this pull request as ready for review October 11, 2025 10:46
@trivialfis trivialfis requested a review from a team as a code owner October 11, 2025 10:46
@trivialfis trivialfis requested a review from divyegala October 11, 2025 10:46
@trivialfis
Copy link
Copy Markdown
Member Author

@csadorf It's ready now.

@trivialfis trivialfis added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currenty a work in progress labels Oct 13, 2025
@csadorf csadorf self-requested a review October 14, 2025 14:15
Copy link
Copy Markdown
Contributor

@csadorf csadorf 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 re-opening this PR!

I have change requests and suggestions.

n_splits=n_splits, shuffle=shuffle, random_state=random_state
)

def split(self, x, y=None):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be an uppercase X.

Suggested change
def split(self, x, y=None):
def split(self, X, y=None):

Comment thread python/cuml/cuml/model_selection/_split.py Outdated
Comment thread docs/source/api.rst
Comment thread python/cuml/cuml/model_selection/_split.py
Comment thread python/cuml/tests/test_split.py
Comment thread python/cuml/tests/test_split.py
Copy link
Copy Markdown
Contributor

@csadorf csadorf left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@trivialfis
Copy link
Copy Markdown
Member Author

All passed.

@csadorf
Copy link
Copy Markdown
Contributor

csadorf commented Oct 31, 2025

/merge

@rapids-bot rapids-bot Bot merged commit 3a8428a into rapidsai:main Oct 31, 2025
101 checks passed
@trivialfis trivialfis deleted the fea-kfold-rebase branch October 31, 2025 17:58
vardhan30016 pushed a commit to vardhan30016/cuml that referenced this pull request Nov 7, 2025
rapidsai#7163 rebased onto branch-25.12.

Closes rapidsai#7088

Continuing the previous PR:
- I have confirmed that the document from the base class `get_n_splits` is correctly inherited for the `KFold`.
- I did not add the `StratifiedKFold` to the Sphinx doc as it did not build successfully. And as previously suggested, changing the stratified kfold should not be bundled into this PR.
- Added a more precise test for the fold size.

*todos*
- [x] rapidsai#7163 (comment)

Authors:
  - Jiaming Yuan (https://github.com/trivialfis)
  - Divye Gala (https://github.com/divyegala)
  - Simon Adorf (https://github.com/csadorf)

Approvers:
  - Simon Adorf (https://github.com/csadorf)

URL: rapidsai#7296
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Ready for Review Ready for review by team Cython / Python Cython or Python issue feature request New feature or request non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA] KFold for cuML & cuDF

4 participants