Skip to content

LabelKFold: shuffling and preserving original order #5390

Closed as not planned
Closed as not planned
@andreasvc

Description

@andreasvc

Currently, LabelKFold sorts samples by weight so as to create balanced folds in terms of size. However, this is at odds with shuffling. Moreover, the regular KFold partitions the samples without changing their order, which is useful if the order is meaningful or reflects a stratification.

My suggestion is to make the sorting for balanced fold sizes in LabelKFold optional, so that shuffling or the original order of samples is honored, by keeping the labels in the order in which they are first encountered.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions