IAugmentation<T, TData>
Interfaces · AiDotNet.Augmentation
Base interface for all data augmentations across domains (image, audio, tabular).
Known implementations: AugmentationBase<T, TData>, IAutoMLAugmentation<T, TData>, ILabelMixingAugmentation<T, TData>, ISpatialAugmentation<T, TData>
For Beginners
Augmentation is like creating variations of your training data. If you’re training an image classifier, flipping images horizontally gives the model more examples to learn from without collecting new data. This helps the model generalize better to new, unseen data.
How It Works
Augmentations are stochastic transformations applied during training to improve model generalization. Unlike preprocessing transforms, augmentations:
- Produce different outputs for the same input (stochastic)
- Are typically disabled during inference (training-only)
- Have a probability of being applied
- Can be composed in pipelines
Properties
| Property | Summary |
|---|---|
bool IsEnabled { get; set; } |
Gets whether this augmentation is currently enabled. |
bool IsTrainingOnly { get; } |
Gets whether this augmentation should only be applied during training. |
double Probability { get; } |
Gets the probability of this augmentation being applied (0.0 to 1.0). |
string Name { get; } |
Gets the name of this augmentation for logging and debugging. |
Methods
| Method | Summary |
|---|---|
IDictionary<string, object> GetParameters() |
Gets the parameters of this augmentation for serialization/logging. |
TData Apply(TData data, AugmentationContext<T> context) |
Applies the augmentation to the input data. |