SmoteTomekAugmenter<T>
Models & Types · AiDotNet.Augmentation.Tabular
Implements SMOTE-Tomek combination for imbalanced datasets.
Inheritance: AugmentationBase<T, Matrix<T>> → TabularAugmenterBase<T> → SmoteTomekAugmenter<T>
For Beginners
SMOTE-Tomek combines SMOTE oversampling with Tomek links cleaning. First, SMOTE generates synthetic minority samples, then Tomek links are removed to clean the class boundary and reduce noise.
How It Works
How it works:
- Apply SMOTE to generate synthetic minority samples
- Identify Tomek links (pairs of samples from different classes that are mutual nearest neighbors)
- Remove the majority class samples from Tomek links
Benefits:
- Balances classes while cleaning the decision boundary
- Reduces noise introduced by SMOTE near the boundary
- More robust than SMOTE alone
Reference: Batista et al., “A Study of the Behavior of Several Methods for Balancing Machine Learning Training Data” (2004)
Constructors
| Constructor | Summary |
|---|---|
SmoteTomekAugmenter(int kNeighbors, double samplingRatio, double probability) |
Creates a new SMOTE-Tomek augmenter. |
Properties
| Property | Summary |
|---|---|
double SamplingRatio { get; } |
Gets the SMOTE sampling ratio. |
int KNeighbors { get; } |
Gets the number of nearest neighbors used by SMOTE. |
Methods
| Method | Summary |
|---|---|
IDictionary<string, object> GetParameters() |
|
ValueTuple<Matrix<T>, Vector<T>> ApplySmoteTomek(Matrix<T> data, Vector<T> labels, AugmentationContext<T> context) |
Applies SMOTE-Tomek to a labeled dataset. |