Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Use Borderline SMOTE to deal with the problem of sample imbalance #150

Open
onesmorewhite opened this issue Mar 3, 2023 · 0 comments
Open

Comments

@onesmorewhite
Copy link

Why only two of these categories have been sample balanced?

from imblearn.over_sampling import BorderlineSMOTE
nn_k = NearestNeighbors(n_neighbors=29)
bsmote = BorderlineSMOTE(random_state=42,k_neighbors=nn_k)
X_train_smote,y_train_smote = bsmote.fit_resample(X_train,y_train)
print(sorted(Counter(y_train_smote).items()))
result:[(0, 136), (1, 136), (2, 3)]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant