How can I store the oversampled data using smote in the separate variables?
import numpy as np
import pandas as pd
from imblearn.over_sampling import SMOTE
from sklearn.preprocessing import LabelEncoder
dataset = pd.read_csv('https://archive.ics.uci.edu/static/public/17/data.csv')
X = dataset.iloc[:, 1:-1].values
y = dataset.iloc[:, -1].values
le = LabelEncoder()
y = le.fit_transform(y)
smt = SMOTE()
X1, y1 = smt.fit_resample(X, y)
#oversampled data using smote in the separate variables
#X2 = ?
#y2 = ?
New contributor
Imaginary is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.