equalSized

fun equalSized(numObservations: Int, numGroups: Int): DataPartition(source)

Creates a partition whose groups are as close to equal in size as the number of observations permits. This is a convenient starting point and a baseline initialization, not a fitted partition.

Parameters

numObservations

the number of observations, must be at least numGroups

numGroups

the desired number of groups, must be positive