Skip to content

Instantly share code, notes, and snippets.

@tfolkman
Created November 11, 2019 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tfolkman/181a16b23a8e6780bd21f99866d7434c to your computer and use it in GitHub Desktop.
Save tfolkman/181a16b23a8e6780bd21f99866d7434c to your computer and use it in GitHub Desktop.
bootstrap
from sklearn.utils import resample
n_bootstraps = 1000
bootstrap_X = []
bootstrap_y = []
for _ in range(n_bootstraps):
sample_X, sample_y = resample(scaled_df, target)
bootstrap_X.append(sample_X)
bootstrap_y.append(sample_y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment