IEpisodicDataset<T, TInput, TOutput>
Interfaces · AiDotNet.MetaLearning.Data
Represents a dataset that can sample episodic tasks for meta-learning.
For Beginners
An episodic dataset is a special kind of dataset used in meta-learning. Instead of just giving you examples one at a time, it can create complete “tasks” or “episodes” that each have their own training and test sets.
For example, if you have a dataset of animal images, an episodic dataset can:
- Randomly pick 5 animal types (e.g., cat, dog, bird, fish, rabbit) - this is “5-way”
- Give you 1 image of each animal for training - this is “1-shot”
- Give you more images of those same animals for testing
This allows the model to practice learning new tasks quickly, which is the core idea of meta-learning.
Properties
| Property | Summary |
|---|---|
DatasetSplit Split { get; } |
Gets the split type of this dataset (train, validation, or test). |
Dictionary<int, int> ClassCounts { get; } |
Gets the number of examples per class in the dataset. |
int NumClasses { get; } |
Gets the total number of classes available in the dataset. |
Methods
| Method | Summary |
|---|---|
IMetaLearningTask<T, TInput, TOutput>[] SampleTasks(int numTasks, int numWays, int numShots, int numQueryPerClass) |
Samples a batch of N-way K-shot tasks from the dataset. |
void SetRandomSeed(int seed) |
Sets the random seed for reproducible task sampling. |