0

I want to resample from a data set so that I only resample positive cases since my data is very unbalanced. Here is my code:

bootstrap=resample(Stroke['stroke']==1,replace=True,n_samples=800,random_state=1)

All I get back is a True\False array.

StupidWolf
  • 45,075
  • 17
  • 40
  • 72

1 Answers1

0

I got it working!

Here is the code:

bootstrap=resample(Stroke[(Stroke['stroke'] == 1)],replace=True,n_samples=800,random_state=101)