SMOTE implementation in Python

I am working on imbalanced dataset in Python.I am referring to SMOTE example from this link

Can you please explain me the example ?Does X and y corresponds to features and labels?Can you please explain me with some other example of smote implementation in python?


For data imbalance problems, mostly handled in three steps.

  1. Over-sample the minority class.
  2. Under-sample the majority class.
  3. Synthesize new minority classes.

SMOTE (Synthetic Minority Over-sampling TEchnique) is coming under the third step. It’s the process of creating a new minority classes from the datasets.

The process in SMOTE is mentioned below.

SMOTE are available in R in the unbalanced package and in Python in the UnbalancedDataset package.

Limitation of SMOTE:

It can only generate examples within the body of available examples—never outside. Formally, SMOTE can only fill in the convex hull of existing minority examples, but not create new exterior regions of minority examples.

Refer - Learning from Imbalanced Classes by TOM FAWCETT for more understanding about imbalanced classes.


1 Like

Thanks Bhuvaneshwaran for the explanation