Kernel dies on fit_resample of SMOTE-NC from imblearn

25 Views Asked by At

I have a dataset for fraud detection (i can't disclose dataset) which is extremely imbalanced, when i use SMOTE everything works, but as i have 9 categorical features i wanted to use SMOTE-NC but when i run fit_resample kernel dies.

Here is code and X.shape is (2262378, 28), y.shape is (2262378,) and

from imblearn.over_sampling import SMOTE ,SMOTENC

cat_cols = [x for x in cols1 if x in cols]

smote_cat = SMOTENC(random_state=42, categorical_features=cat_cols)
X_res, y_res = smote_cat.fit_resample(X, y)

I use vscode and conda environment on Macbook Air with M1 with 8gb of RAM

My conda's requirements.txt on pastebin (https://pastebin.com/DRu4G2Sn)

I tried freeing my ram by closing another apps, restarting laptop and running cells with minimal data usage, it didn't work kernel still dies

0

There are 0 best solutions below