IMetaDataset<T, TInput, TOutput>
Interfaces · AiDotNet.Interfaces
Represents a high-level meta-dataset that can generate episodes for meta-learning.
Unlike IEpisodicDataset which operates on pre-built episodes,
this interface generates episodes on-the-fly from an underlying data source.
Known implementations: MetaDatasetBase<T, TInput, TOutput>, MetaDatasetFormat<T, TInput, TOutput>
For Beginners
A meta-dataset is a collection of data organized so that we can create many different learning tasks from it. Each task (episode) contains a small training set (support) and a small test set (query). The meta-learner trains across many such tasks to learn how to learn quickly from small amounts of data.
Properties
| Property | Summary |
|---|---|
IReadOnlyDictionary<int, int> ClassExampleCounts { get; } |
Gets the number of examples available for each class, keyed by class index. |
int TotalClasses { get; } |
Gets the total number of distinct classes available in the dataset. |
int TotalExamples { get; } |
Gets the total number of examples across all classes. |
string Name { get; } |
Gets the name of this meta-dataset. |
Methods
| Method | Summary |
|---|---|
IEpisode<T, TInput, TOutput> SampleEpisode(int numWays, int numShots, int numQueryPerClass) |
Samples a single episode from the dataset. |
IReadOnlyList<IEpisode<T, TInput, TOutput>> SampleEpisodes(int count, int numWays, int numShots, int numQueryPerClass) |
Samples multiple episodes from the dataset. |
bool SupportsConfiguration(int numWays, int numShots, int numQueryPerClass) |
Gets whether this dataset supports a given N-way K-shot configuration. |
void SetSeed(int seed) |
Sets the random seed for reproducible episode generation. |