9951 explained code solutions for 126 technologies


python-scikit-learnUsing resample example


from sklearn import utils

X = [1,2,2,3,2,1,1,3]
Xr = utils.resample(X, n_samples=6, random_state=1)ctrl + c
from sklearn import

import module from scikit-learn

utils.resample(

resample given dataset in a consistent way

n_samples

number of samples to get for result

random_state

random seed to get repeatable results