Table of Contents

Class MetaLearnerOptionsBuilder<T>

Namespace
AiDotNet.MetaLearning
Assembly
AiDotNet.dll

Fluent builder for MetaLearnerOptionsBase.

public class MetaLearnerOptionsBuilder<T>

Type Parameters

T

The numeric type (e.g., float, double).

Inheritance
MetaLearnerOptionsBuilder<T>
Inherited Members

Methods

Build()

Builds the options instance.

public MetaLearnerOptionsBase<T> Build()

Returns

MetaLearnerOptionsBase<T>

The configured options.

Exceptions

InvalidOperationException

Thrown if validation fails.

WithAdaptationSteps(int)

Sets the number of adaptation steps.

public MetaLearnerOptionsBuilder<T> WithAdaptationSteps(int steps)

Parameters

steps int

Returns

MetaLearnerOptionsBuilder<T>

WithCheckpointing(bool, int)

Configures checkpointing settings.

public MetaLearnerOptionsBuilder<T> WithCheckpointing(bool enabled = true, int frequency = 500)

Parameters

enabled bool
frequency int

Returns

MetaLearnerOptionsBuilder<T>

WithEvaluation(int, int)

Configures evaluation settings.

public MetaLearnerOptionsBuilder<T> WithEvaluation(int tasks = 100, int frequency = 100)

Parameters

tasks int
frequency int

Returns

MetaLearnerOptionsBuilder<T>

WithFirstOrder(bool)

Enables first-order approximation (FOMAML).

public MetaLearnerOptionsBuilder<T> WithFirstOrder(bool useFirstOrder = true)

Parameters

useFirstOrder bool

Returns

MetaLearnerOptionsBuilder<T>

WithGradientClipping(double?)

Sets the gradient clipping threshold.

public MetaLearnerOptionsBuilder<T> WithGradientClipping(double? threshold)

Parameters

threshold double?

Returns

MetaLearnerOptionsBuilder<T>

WithInnerLearningRate(double)

Sets the inner loop learning rate.

public MetaLearnerOptionsBuilder<T> WithInnerLearningRate(double rate)

Parameters

rate double

Returns

MetaLearnerOptionsBuilder<T>

WithMetaBatchSize(int)

Sets the meta-batch size.

public MetaLearnerOptionsBuilder<T> WithMetaBatchSize(int size)

Parameters

size int

Returns

MetaLearnerOptionsBuilder<T>

WithNumMetaIterations(int)

Sets the number of meta-iterations.

public MetaLearnerOptionsBuilder<T> WithNumMetaIterations(int iterations)

Parameters

iterations int

Returns

MetaLearnerOptionsBuilder<T>

WithOuterLearningRate(double)

Sets the outer loop learning rate.

public MetaLearnerOptionsBuilder<T> WithOuterLearningRate(double rate)

Parameters

rate double

Returns

MetaLearnerOptionsBuilder<T>

WithRandomSeed(int?)

Sets the random seed for reproducibility.

public MetaLearnerOptionsBuilder<T> WithRandomSeed(int? seed)

Parameters

seed int?

Returns

MetaLearnerOptionsBuilder<T>