AugmentationOperation<T>
Models & Types · AiDotNet.Preprocessing.DataPreparation
A row operation that applies data augmentation to increase dataset size.
Implements: IRowOperation<T>
For Beginners
Data augmentation creates new synthetic data points based on your existing data. This is especially useful when:
- You have imbalanced classes (one class has way more samples than another)
- You have limited training data
- You want to reduce overfitting
How It Works
This operation wraps tabular augmenters (like SMOTE) to generate synthetic samples. Both features (X) and labels (y) are augmented together to maintain alignment.
Common Use Case - SMOTE: If you’re predicting fraud (rare) vs normal (common), SMOTE creates synthetic fraud examples so your model learns to recognize fraud better.
Constructors
| Constructor | Summary |
|---|---|
AugmentationOperation(TabularAugmenterBase<T> augmenter, Vector<T> targetLabels) |
Creates a new augmentation operation. |
Properties
| Property | Summary |
|---|---|
TabularAugmenterBase<T> Augmenter { get; } |
Gets the underlying augmenter. |
bool IsFitted { get; } |
|
string Description { get; } |
Methods
| Method | Summary |
|---|---|
ValueTuple<Matrix<T>, Vector<T>> FitResample(Matrix<T> X, Vector<T> y) |
|
ValueTuple<Tensor<T>, Tensor<T>> FitResampleTensor(Tensor<T> X, Tensor<T> y) |