Skip to content

Instantly share code, notes, and snippets.

@oborchers
Created May 30, 2020 13:57
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 oborchers/2f9826e5275dabef071ae44ab8860b82 to your computer and use it in GitHub Desktop.
Save oborchers/2f9826e5275dabef071ae44ab8860b82 to your computer and use it in GitHub Desktop.
exclusion_matrix = random_sparse(
m = replications, # Number of subsampled datasets
n = len(X), # Length of training data
density = p_excluded/100., # Percentage of excluded observations
format = "csr",
dtype = bool, # True = Excluded
random_state=random_state,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment