Table of Contents

Interface ICurriculumLearnerConfig<T>

Namespace
AiDotNet.CurriculumLearning.Interfaces
Assembly
AiDotNet.dll

Configuration interface for curriculum learning.

public interface ICurriculumLearnerConfig<T>

Type Parameters

T

The numeric type used for calculations.

Remarks

For Beginners: This configuration controls how curriculum learning behaves. You can set things like how many epochs to train, how to schedule the introduction of harder samples, and when to stop training.

Key Configuration Areas:

  • Training Duration: Total epochs, epochs per phase
  • Curriculum Pacing: Starting fraction, schedule type
  • Early Stopping: Patience, improvement threshold
  • Difficulty Settings: Recalculation frequency, normalization

Properties

BatchSize

Gets the batch size for training.

int BatchSize { get; }

Property Value

int

DifficultyRecalculationFrequency

Gets how often to recalculate difficulties (in epochs).

int DifficultyRecalculationFrequency { get; }

Property Value

int

EarlyStoppingMinDelta

Gets the minimum improvement required to reset patience.

T EarlyStoppingMinDelta { get; }

Property Value

T

EarlyStoppingPatience

Gets the patience for early stopping (epochs without improvement).

int EarlyStoppingPatience { get; }

Property Value

int

EpochsPerPhase

Gets the number of epochs per curriculum phase.

int EpochsPerPhase { get; }

Property Value

int

FinalDataFraction

Gets the final data fraction (at final phase).

T FinalDataFraction { get; }

Property Value

T

Remarks

Usually 1.0 to include all samples by the end of training.

InitialDataFraction

Gets the initial data fraction (at phase 0).

T InitialDataFraction { get; }

Property Value

T

Remarks

Typically starts between 0.1 and 0.4 to include only the easiest samples initially.

LearningRate

Gets the learning rate.

T LearningRate { get; }

Property Value

T

LogAction

Gets the custom logging action.

Action<string>? LogAction { get; }

Property Value

Action<string>

Remarks

If null, logs to Console.WriteLine by default. Provide a custom action to integrate with your logging framework (e.g., Serilog, NLog, Microsoft.Extensions.Logging).

NormalizeDifficulties

Gets whether to normalize difficulty scores to [0, 1].

bool NormalizeDifficulties { get; }

Property Value

bool

NumPhases

Gets the number of curriculum phases.

int NumPhases { get; }

Property Value

int

RandomSeed

Gets the random seed for reproducibility.

int? RandomSeed { get; }

Property Value

int?

RecalculateDifficulties

Gets whether to recalculate difficulty scores during training.

bool RecalculateDifficulties { get; }

Property Value

bool

Remarks

If true, difficulties are updated as the model learns. This can be more accurate but also more expensive.

ScheduleType

Gets the type of curriculum schedule to use.

CurriculumScheduleType ScheduleType { get; }

Property Value

CurriculumScheduleType

ShuffleWithinPhase

Gets whether to shuffle within curriculum phases.

bool ShuffleWithinPhase { get; }

Property Value

bool

TotalEpochs

Gets the total number of training epochs.

int TotalEpochs { get; }

Property Value

int

UseDifficultyWeighting

Gets whether to apply sample weighting based on difficulty.

bool UseDifficultyWeighting { get; }

Property Value

bool

UseEarlyStopping

Gets whether to use early stopping.

bool UseEarlyStopping { get; }

Property Value

bool

Verbosity

Gets the verbosity level for logging.

CurriculumVerbosity Verbosity { get; }

Property Value

CurriculumVerbosity