h2oai / h2oai/datatable

Support stratified kfold

Open
#3,082 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.9k
Forks
164
Avg merge
7h 31m
Merged PRs (30d)
1

Description

It would be very useful to support [Stratified KFold](https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.StratifiedKFold.html) which is way more commonly used than a random KFold.

Typically it'd look something like:
```python
import datatable as dt
from datatable.models import kfold_stratified

X = dt.Frame(...)

stratified_splits = kfold_stratified(by=X['group'], nsplits=5, seed=1234)
```
where `X` is a frame having a column `group` by which the stratification is done.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.