Module Modelkit.Split

A validated train/test selection over one aligned source.

Train and test rows must be non-empty, unique within each partition, disjoint, and aligned to the same source size. materialize explicitly copies both selections into independent aligned datasets; constructing or inspecting a split does not copy dataset buffers.

type t
val create : source_size:int -> train:int array -> test:int array -> (t, Error.t) result
val of_views : train:Row_view.t -> test:Row_view.t -> (t, Error.t) result
val train : t -> Row_view.t
val test : t -> Row_view.t
val materialize : 'kind Dataset.t -> t -> ('kind Dataset.t * 'kind Dataset.t, Error.t) result