FreqPriorAlgorithm<T, TInput, TOutput>

Models & Types · AiDotNet.MetaLearning.Algorithms

Implementation of FreqPrior: Frequency-based prior for cross-domain few-shot learning.

Inheritance: ModelBase<T, TInput, TOutput> → MetaLearnerBase<T, TInput, TOutput> → FreqPriorAlgorithm<T, TInput, TOutput>

How It Works

FreqPrior decomposes the parameter vector using a discrete cosine transform (DCT)-like basis. Low-frequency components (capturing smooth, domain-invariant structure) are strongly regularized toward the meta-prior, while high-frequency components (capturing task-specific details) are allowed to adapt freely. This encourages learning transferable features that generalize across domains.

Algorithm:

Constructors

Constructor Summary
FreqPriorAlgorithm(FreqPriorOptions<T, TInput, TOutput> options)

Properties

Property Summary
MetaLearningAlgorithmType AlgorithmType { get; }

Methods

Method Summary
IModel<TInput, TOutput, ModelMetadata<T>> Adapt(IMetaLearningTask<T, TInput, TOutput> task)
T MetaTrain(TaskBatch<T, TInput, TOutput> taskBatch)