Skip to content

cross_val_predict with groups input: is it used? #11406

Closed
@skyhuang1208

Description

@skyhuang1208

Description

Hi all,

In cross_val_predict, from the documentation it seems we can input groups and cv= integer/None to have both GroupKFold and StratifiedKFold constraints. However, I looked into the source code and I think there is no such K-fold (with both 2 constraints). In fact, as mentioned in the description the cross_val_predict use StratifiedKFold or KFold and in the cases groups are "Always ignored". So I was wondering if the groups in cross_val_predict cannot be used at all cases? (not sure in the case if we input GroupKFold() as the customized cv)

Also, if not implemented, is it possible to have a K-Fold that can have both constraints (stratified-group-k-fold) ? It might not always have a solution with 2 constraints satisfied, but I guess an approximated solution might be available.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions