package modelkit

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Modelkit.Repeated_k_fold

Repeated shuffled K-fold, defaulting to five folds and ten repetitions. Each repetition tests every row exactly once. Splits are emitted in repetition-major, then fold-major order; row 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.

type params = {
  1. folds : int;
  2. repeats : int;
}
type t
val create : ?folds:int -> ?repeats:int -> unit -> (t, Error.t) result
include SPLITTER with type t := t and type params := params and type target = unit and type rng = Rng.t
include SPECIFICATION with type t := t with type params := params
val clone : t -> t
val params : t -> params
type target = unit
type rng = Rng.t
val split : t -> rng:rng -> ?groups:Groups.t -> x:Matrix.t -> y:target option -> unit -> ((Row_view.t * Row_view.t) array, Error.t) result