Multi label Synthetic Minority Over-sampling Technique (MLSMOTE)
MLSMOTE is a technique used to handle data imbalance in multi-label classification problems. This implementation provides an updated version of the original MLSMOTE algorithm, with additional features and improvements.
- Generic input support: accepts NumPy arrays, pandas DataFrames, lists of label collections, and SciPy sparse label matrices; outputs match the input types.
- Paper-faithful distances: Euclidean distance over continuous features plus the Value Difference Metric (per minority label) over categorical features.
- Batch generation: synthetic samples are computed from the original data and appended at the end (matches the reference implementation by the paper's authors).
- Bug fixes:
sampling_strategystored correctly,categorical_featuresoptional (defaults to all-continuous), deterministic withrandom_state.
Run the tests with python -m pytest test_mlsmote.py and see example.py for usage.
For more information on MLSMOTE and its applications, please refer to:
- Handling Data Imbalance in Multi-Label Classification: MLSMOTE
- Imbalanced-learn: MLSMOTE implementation
Provided in example.py file.