Accessory Function for Cross-validation
Randomly partition a dataset into k approximately equally sized partitions.
a dataset for partitioning.
the number of partitions; the cross-validation fold number.
Returns a list containing the partitioned datasets.
This function is not designed to be called directly,
but acts within