def Smote_sampler(self, sampling_strategy="auto", random_state=None, m_neighbors=10, kind="regular"): X_modified, Y_modified = SMOTE(sampling_strategy=sampling_strategy, random_state=random_state, m_neighbors=m_neighbors, kind=kind) return X_modified.merge(Y_modified, left_index=True, right_index=True)