SMOTENCGenerator<T>
Models & Types · AiDotNet.NeuralNetworks.SyntheticData
SMOTE-NC generator that creates synthetic minority samples by interpolating between existing minority samples and their k-nearest neighbors, supporting both continuous and categorical features.
Inheritance: SyntheticTabularGeneratorBase<T> → SMOTENCGenerator<T>
For Beginners
SMOTE-NC generates new minority samples by “mixing” existing ones:
Given a minority sample and a nearby neighbor:
- For numbers (age, income): pick a random point between the two values
Example: if sample has age=30 and neighbor has age=40, synthetic might have age=35
- For categories (gender, region): use the most common value among the k neighbors
Example: if 3 of 5 neighbors have region=“East”, synthetic gets region=“East”
This is simpler and faster than GANs, and works well for structured tabular data.
How It Works
SMOTE-NC (Nominal and Continuous) operates as follows:
- Extract all minority class samples from the training data
- For each minority sample, find its k nearest neighbors among other minority samples
- Generate synthetic samples by interpolating between samples and randomly chosen neighbors
Constructors
| Constructor | Summary |
|---|---|
SMOTENCGenerator(SMOTENCOptions<T> options) |
Initializes a new instance of the SMOTENCGenerator class. |