Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion imblearn/over_sampling/_smote/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,30 @@


class BaseSMOTE(BaseOverSampler):
"""Base class for the different SMOTE algorithms."""
"""
Synthetic Minority Over-sampling Technique (SMOTE).

SMOTE is an over-sampling method that generates synthetic samples
for the minority class instead of duplicating existing samples.
New samples are created by interpolating between a data point
and its nearest neighbors in feature space.

This technique is commonly used in imbalanced classification
problems such as fraud detection, medical diagnosis, or
anomaly detection.

Example
-------
>>> from imblearn.over_sampling import SMOTE
>>> smote = SMOTE(random_state=42)
>>> X_resampled, y_resampled = smote.fit_resample(X, y)

Notes
-----
SMOTE works best when features are continuous and may not be
suitable for datasets with many categorical variables.
"""


_parameter_constraints: dict = {
**BaseOverSampler._parameter_constraints,
Expand Down