package modelkit
Module Modelkit.Repeated_stratified_k_fold
Repeated shuffled stratified K-fold, with five folds and ten repetitions by default. Uses the class allocation and feasibility rules of Stratified_k_fold; rare classes can be absent in a fold. Splits are repetition-major, then fold-major, and indices retain source order. Extending the repetition count preserves earlier repetitions. Random streams are deterministic for the same input and seed, independent of execution scheduling; they do not reproduce NumPy random streams. Groups do not constrain these splits; use group-aware splitting when group exclusion is required.
include SPLITTER
with type t := t
and type params := params
and type target = Target.classification Target.t
and type rng = Rng.t
type target = Target.classification Target.ttype rng = Rng.tval split :
t ->
rng:rng ->
?groups:Groups.t ->
x:Matrix.t ->
y:target option ->
unit ->
((Row_view.t * Row_view.t) array, Error.t) result