Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1.         X_resampled, y_resampled = SMOTE(kind='regular').fit_sample(train_clone, y_train)
  2.         X_resampled = pd.DataFrame(data=X_resampled, columns=train.columns[:-1])
  3.         y_resampled = pd.Series(y_resampled)
  4.  
  5.         print("Processed by SMOTE q2norm and target shapes", X_resampled.shape, y_resampled.shape)
  6.  
  7.         X_resampled_new_points = X_resampled.loc[~X_resampled.index.isin(train.index)].reset_index(drop=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement