Table of Contents

Class CurriculumLearnerConfig<T>

Namespace
AiDotNet.CurriculumLearning
Assembly
AiDotNet.dll

Configuration for curriculum learning training.

public class CurriculumLearnerConfig<T> : ICurriculumLearnerConfig<T>

Type Parameters

T

The numeric type used for calculations.

Inheritance
CurriculumLearnerConfig<T>
Implements
Inherited Members

Remarks

For Beginners: This class holds all the settings that control how curriculum learning works. You can configure things like how many training phases to use, when to stop early if the model isn't improving, and how to schedule the progression from easy to hard samples.

Key Configuration Areas:

  • Training: TotalEpochs, BatchSize, LearningRate
  • Curriculum: NumPhases, InitialDataFraction, FinalDataFraction
  • Schedule: ScheduleType (Linear, Exponential, Step, etc.)
  • Early Stopping: Patience, MinDelta for stopping when plateaued

Constructors

CurriculumLearnerConfig()

Initializes a new instance with default values.

public CurriculumLearnerConfig()

Properties

BatchSize

Gets the batch size for training.

public int BatchSize { get; init; }

Property Value

int

DifficultyRecalculationFrequency

Gets how often to recalculate difficulties (every N epochs).

public int DifficultyRecalculationFrequency { get; init; }

Property Value

int

EarlyStoppingMinDelta

Gets the minimum improvement required to reset early stopping counter.

public T EarlyStoppingMinDelta { get; init; }

Property Value

T

EarlyStoppingPatience

Gets the number of epochs without improvement before early stopping.

public int EarlyStoppingPatience { get; init; }

Property Value

int

EpochsPerPhase

Gets the number of epochs per phase.

public int EpochsPerPhase { get; }

Property Value

int

FinalDataFraction

Gets the final data fraction (usually 1.0 to include all samples).

public T FinalDataFraction { get; init; }

Property Value

T

InitialDataFraction

Gets the initial data fraction (starting fraction of easiest samples).

public T InitialDataFraction { get; init; }

Property Value

T

LearningRate

Gets the learning rate.

public T LearningRate { get; init; }

Property Value

T

LogAction

Gets the custom logging action.

public Action<string>? LogAction { get; init; }

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].

public bool NormalizeDifficulties { get; init; }

Property Value

bool

NumPhases

Gets the number of curriculum phases.

public int NumPhases { get; init; }

Property Value

int

RandomSeed

Gets the random seed for reproducibility.

public int? RandomSeed { get; init; }

Property Value

int?

RecalculateDifficulties

Gets whether to recalculate sample difficulties during training.

public bool RecalculateDifficulties { get; init; }

Property Value

bool

ScheduleType

Gets the curriculum schedule type.

public CurriculumScheduleType ScheduleType { get; init; }

Property Value

CurriculumScheduleType

ShuffleWithinPhase

Gets whether to shuffle samples within each phase.

public bool ShuffleWithinPhase { get; init; }

Property Value

bool

TotalEpochs

Gets the total number of training epochs.

public int TotalEpochs { get; init; }

Property Value

int

UseDifficultyWeighting

Gets whether to weight sample contributions by difficulty.

public bool UseDifficultyWeighting { get; init; }

Property Value

bool

UseEarlyStopping

Gets whether early stopping is enabled.

public bool UseEarlyStopping { get; init; }

Property Value

bool

Verbosity

Gets the verbosity level for logging.

public CurriculumVerbosity Verbosity { get; init; }

Property Value

CurriculumVerbosity

Methods

Clone()

Creates a copy of this configuration.

public CurriculumLearnerConfig<T> Clone()

Returns

CurriculumLearnerConfig<T>

CreateBuilder()

Creates a builder for fluent configuration.

public static CurriculumLearnerConfigBuilder<T> CreateBuilder()

Returns

CurriculumLearnerConfigBuilder<T>