ICurriculumLearner<T, TInput, TOutput>

Interfaces · AiDotNet.CurriculumLearning.Interfaces

Interface for curriculum learning trainers that train models using a structured curriculum.

Known implementations: CurriculumLearner<T, TInput, TOutput>

For Beginners

Curriculum learning is inspired by how humans learn - starting with easy examples and gradually progressing to harder ones. Just like a student learns basic arithmetic before calculus, a model trained with curriculum learning sees simple examples first, then progressively harder ones.

How It Works

Why Curriculum Learning?

Key Components:

References:

Properties

Property Summary
ICurriculumLearnerConfig<T> Config { get; } Gets the configuration for the curriculum learner.
ICurriculumScheduler<T> Scheduler { get; } Gets the curriculum scheduler that controls training progression.
IDifficultyEstimator<T, TInput, TOutput> DifficultyEstimator { get; } Gets the difficulty estimator used to rank samples.
IFullModel<T, TInput, TOutput> BaseModel { get; } Gets the underlying model being trained.
T CurrentPhase { get; } Gets the current training phase (0-1, where 1 means all samples are available).
bool IsTraining { get; } Gets whether training is currently in progress.
int CurrentEpoch { get; } Gets the current epoch number.

Methods

Method Summary
CurriculumLearningResult<T> Train(IDataset<T, TInput, TOutput> trainingData) Trains the model using curriculum learning.
CurriculumLearningResult<T> Train(IDataset<T, TInput, TOutput> trainingData, IDataset<T, TInput, TOutput> validationData) Trains the model with a validation set for monitoring.
CurriculumLearningResult<T> TrainWithDifficulty(IDataset<T, TInput, TOutput> trainingData, Vector<T> difficultyScores) Trains with pre-computed difficulty scores.
IReadOnlyList<CurriculumPhaseResult<T>> GetPhaseHistory() Gets the training history.
Vector<T> EstimateDifficulties(IDataset<T, TInput, TOutput> dataset) Estimates difficulty scores for all samples in a dataset.
bool AdvancePhase() Advances the curriculum to the next phase.
int[] GetCurrentCurriculumIndices(Vector<T> allDifficulties) Gets the indices of samples available at the current curriculum phase.
void Load(string path) Loads the curriculum learner state.
void ResetCurriculum() Resets the curriculum to the initial phase.
void Save(string path) Saves the curriculum learner state.