cleverly.learners.FoldOrigin#

class cleverly.learners.FoldOrigin(generator: str, scheme: str, requested_n_folds: int, seed: int)[source]#

The record of how random_partition() drew one split.

The four fields and the rows’ cluster labels determine the assignment. A caller can therefore draw the split again from this record and compare the result.

Parameters:
generatorstr

The generator name and version, "cleverly.random_partition/1" for every split this package draws.

schemestr

"vfold" for a row-level split, and "grouped" for a split of whole clusters.

requested_n_foldsint

The fold count the caller asked for, before resolve_n_folds() capped it.

seedint

The seed of the draw.

See also

random_partition

The generator that writes this record.

Folds

The split that carries this record as its origin.

Methods#

Attributes#

FoldOrigin.generator: str#
FoldOrigin.scheme: str#
FoldOrigin.requested_n_folds: int#
FoldOrigin.seed: int#