DKTOptions<T, TInput, TOutput>
Options & Configuration · AiDotNet.MetaLearning.Options
Configuration options for DKT (Deep Kernel Transfer) (Patacchiola et al., ICLR 2020).
Inheritance: ModelOptions → DKTOptions<T, TInput, TOutput>
Implements: IMetaLearnerOptions<T>
For Beginners
DKT combines neural networks with Gaussian processes:
- A neural network extracts features (like other meta-learners)
- A Gaussian Process (GP) classifier operates on these features
- The GP provides not just predictions but confidence/uncertainty estimates
- The kernel function (similarity measure) is learned end-to-end
Think of it as: the neural network finds the right feature space, and the GP provides principled probabilistic classification in that space.
How It Works
DKT combines deep feature extractors with Gaussian processes for Bayesian few-shot classification. The deep features serve as the kernel input space, and the GP provides principled uncertainty estimates.
Reference: Patacchiola, M., Turner, J., Crowley, E.J., O’Boyle, M., & Sherron, A. (2020). Bayesian Meta-Learning for the Few-Shot Setting via Deep Kernels. ICLR 2020.
Constructors
| Constructor | Summary |
|---|---|
DKTOptions(IFullModel<T, TInput, TOutput> metaModel) |
Initializes a new instance of DKTOptions. |
Properties
| Property | Summary |
|---|---|
IEpisodicDataLoader<T, TInput, TOutput> DataLoader { get; set; } |
Gets or sets the episodic data loader. |
IFullModel<T, TInput, TOutput> MetaModel { get; set; } |
Gets or sets the feature extractor model. |
IGradientBasedOptimizer<T, TInput, TOutput> InnerOptimizer { get; set; } |
Must stay null: this algorithm takes no plain gradient inner step (it adapts without one, or by its own update rule), so a supplied optimizer is rejected when the learner is built. |
IGradientBasedOptimizer<T, TInput, TOutput> MetaOptimizer { get; set; } |
Optimizer for the meta-update. |
ILossFunction<T> LossFunction { get; set; } |
Loss function for meta-training; null uses the default multi-class classification loss. |
bool EnableCheckpointing { get; set; } |
|
bool UseFirstOrder { get; set; } |
|
double InnerLearningRate { get; set; } |
|
double KernelLengthScale { get; set; } |
Gets or sets the kernel length-scale parameter. |
double NoiseVariance { get; set; } |
Gets or sets the noise variance for the GP likelihood. |
double OuterLearningRate { get; set; } |
|
double? GradientClipThreshold { get; set; } |
|
int AdaptationSteps { get; set; } |
Number of gradient steps taken on each task’s support set (0: this algorithm adapts without gradient steps). |
int CheckpointFrequency { get; set; } |
|
int EvaluationFrequency { get; set; } |
|
int EvaluationTasks { get; set; } |
|
int FeatureDim { get; set; } |
Gets or sets the per-example feature dimension for splitting flattened vectors. |
int MetaBatchSize { get; set; } |
|
int NumMetaIterations { get; set; } |
|
int? RandomSeed { get; set; } |
Gets or sets the random seed. |
string KernelType { get; set; } |
Gets or sets the kernel type for the Gaussian process. |
Methods
| Method | Summary |
|---|---|
IMetaLearnerOptions<T> Clone() |
|
bool IsValid() |