Return entries assigned to all folds except k.
Return the greatest index i of an entry in cdf such that cdf(i) <= x
Return entries assigned to fold k.
Assign each entry in xs to split in the [0, K) range with probability equal to the given pdf.