Skip to content
This repository was archived by the owner on Jul 13, 2023. It is now read-only.
This repository was 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

@onesmorewhite

Description

@onesmorewhite

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)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions