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.
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.
I got it working!
Here is the code:
bootstrap=resample(Stroke[(Stroke['stroke'] == 1)],replace=True,n_samples=800,random_state=101)