package core_extended

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

Extensions to Core.Core_array.

val random_split : ?random_state:Core.Random.State.t -> 'a array -> p:float -> 'a array * 'a array

makes a random split & subset of an array; p (the fraction that you want to split) is constrained to be 0, 1. Note that the length of the first array will be the closest integer to the fraction you desired, meaning that each element is NOT selected with probability exactly p.

val random_sub : ?random_state:Core.Random.State.t -> 'a array -> p:float -> 'a array
OCaml

Innovation. Community. Security.