pairot.pp.downsample_indices#
- pairot.pp.downsample_indices(labels, n_samples, random_state=0)#
Downsample indices stratified by labels.
Downsamples an array of labels and returns the indices to keep. For each unique label, if there are fewer than
n_samples, keep all indices; otherwise, randomly samplen_samplesindices.