Skip to content

Instantly share code, notes, and snippets.

@ParthNipunDave
Created June 9, 2021 07:22
Show Gist options
  • Save ParthNipunDave/04a1c1ab5c973cebeb5be17aff44f2c1 to your computer and use it in GitHub Desktop.
Save ParthNipunDave/04a1c1ab5c973cebeb5be17aff44f2c1 to your computer and use it in GitHub Desktop.
smote=SMOTE()
train_x,test_x,train_y,test_y=train_test_split(data[cols],data['Outcome'],test_size=0.3,random_state=101)
print(train_x.shape,train_y.shape,test_x.shape,test_y.shape)
train_x,train_y=smote.fit_resample(train_x,train_y)
print(train_x.shape,train_y.shape,test_x.shape,test_y.shape)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment