Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

smote on dataframe of feature

from imblearn.over_sampling import SMOTE
sm = SMOTE(random_state = 42)
X_train_oversampled, y_train_oversampled = sm.fit_sample(X_train, y_train)
X_train = pd.DataFrame(X_train_oversampled, columns=X_train.columns)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #smote #dataframe #feature
ADD COMMENT
Topic
Name
5+5 =