This page

Citing

Please consider citing the scikit-learn.

9.21.2. sklearn.utils.resample

sklearn.utils.resample(*arrays, **options)

Resample arrays or sparse matrices in a consistent way

The default strategy implements one step of the bootstrapping procedure.

Parameters :

*arrays : sequence of arrays or scipy.sparse matrices with same shape[0]

replace : boolean, True by default

Implements resampling with replacement. If False, this will implement (sliced) random permutations.

n_samples : int, None by default

Number of samples to generate. If left to None this is automatically set to the first dimension of the arrays.

random_state : int or RandomState instance

Control the shuffling for reproducible behavior.