Class LinearScheduler<T>
- Namespace
- AiDotNet.CurriculumLearning.Schedulers
- Assembly
- AiDotNet.dll
Curriculum scheduler with linear progression from easy to hard samples.
public class LinearScheduler<T> : CurriculumSchedulerBase<T>, ICurriculumScheduler<T>
Type Parameters
TThe numeric type used for calculations.
- Inheritance
-
LinearScheduler<T>
- Implements
- Inherited Members
Remarks
For Beginners: This scheduler increases the data fraction linearly over training epochs. It starts with easy samples and gradually includes more difficult samples at a constant rate.
Progression Pattern:
fraction(epoch) = min_fraction + (epoch / total_epochs) * (max_fraction - min_fraction)
Example: With minFraction=0.2 and maxFraction=1.0 over 10 epochs:
- Epoch 0: 20% easiest samples
- Epoch 5: 60% easiest samples
- Epoch 10: 100% of all samples
Best For:
- Tasks with evenly distributed difficulty
- When constant progression rate is desired
- Simple, predictable curriculum schedules
Constructors
LinearScheduler(int, T?, T?)
Initializes a new instance of the LinearScheduler<T> class.
public LinearScheduler(int totalEpochs, T? minFraction = default, T? maxFraction = default)
Parameters
totalEpochsintTotal number of training epochs.
minFractionTInitial data fraction (default 0.1).
maxFractionTFinal data fraction (default 1.0).
Properties
Name
Gets the name of this scheduler.
public override string Name { get; }
Property Value
Methods
GetDataFraction()
Gets the current data fraction using linear interpolation.
public override T GetDataFraction()
Returns
- T