This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://imbalanced-learn.readthedocs.io/en/stable/generated/imblearn.over_sampling.SMOTENC.html | |
# SMOTENC (SMOTE) for Pandas DataFrame | |
# - this codes uses SMOTENC (imbalanced-learn library) for oversampling imbalanced data | |
# - it preserves dataframe object, columns names and dtypes | |
from imblearn.over_sampling import SMOTENC | |
def col_ins(ds, var): | |
# column names to indices |