Skip to content

partition actually *does* allow shuffle=true if stratify != nothing? #1015

@dpaetzel

Description

@dpaetzel

The docs of partition say that

stratify=nothing: if a vector is specified, the partition will match the stratification of the given vector. In that case, shuffle cannot be false`.

However,

  1. shuffle is internally set to true and a shuffle performed if an RNG is supplied, even if shuffle=false (i.e. the docs should probably also say don't supply an RNG either?)
  2. I'm fairly confident, that the stratify vector is actually correctly indexed into (here) even if shuffle=true. (Ideally, someone with more code familiarity would quickly look over this, too, though—me being fairly confident may not be enough for the standards of this repo.)

If I'm mistaken, then sorry for the noise.

If not, then it may make sense to update the docs (in either case)?

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