SelfPacedScheduler<T>

Models & Types · AiDotNet.CurriculumLearning.Schedulers

Self-paced curriculum scheduler that adapts sample selection based on model performance.

Inheritance: CurriculumSchedulerBase<T> → SelfPacedScheduler<T>

Implements: ISelfPacedScheduler<T>

For Beginners

Unlike fixed schedulers, self-paced learning dynamically selects samples based on the model’s current ability. Samples with loss below a threshold are considered “easy enough” and included in training. The threshold increases over time to include progressively harder samples.

How It Works

How It Works:

Self-Paced Regularizers:

References:

Constructors

Constructor Summary
SelfPacedScheduler(int totalEpochs, T initialLambda, T lambdaGrowthRate, T maxLambda, SelfPaceRegularizer regularizer) Initializes a new instance of the SelfPacedScheduler class.

Properties

Property Summary
T CurrentThreshold { get; } Gets the current pace threshold (lambda).
T GrowthRate { get; set; } Gets or sets the growth rate for the pace parameter.
T PaceParameter { get; set; } Gets or sets the current pace threshold (lambda).
Vector<T> SampleWeights { get; } Gets sample weights from the last selection.
string Name { get; } Gets the name of this scheduler.

Methods

Method Summary
Dictionary<string, object> GetStatistics() Gets scheduler-specific statistics.
T GetDataFraction() Gets the current data fraction (estimated from lambda progression).
ValueTuple<int[], Vector<T>> SelectSamplesWithWeights(Vector<T> losses) Selects samples based on current losses and pace threshold.
Vector<T> ComputeSampleWeights(Vector<T> losses) Computes sample weights based on current losses and pace threshold.
bool StepEpoch(CurriculumEpochMetrics<T> epochMetrics) Updates lambda threshold based on epoch metrics.
int[] GetCurrentIndices(int[] sortedIndices, int totalSamples) Selects samples based on difficulty scores.
void Reset() Resets the scheduler to initial state.