ContinualLearningResult<T>
Models & Types · AiDotNet.ContinualLearning.Results
Result from training on a single task in continual learning.
For Beginners
This class captures everything that happened during training on one task - how well the model learned, how long it took, and whether it forgot previous knowledge.
How It Works
Key Metrics Explained:
- Training Loss: How far predictions were from targets (lower is better)
- Training Accuracy: Percentage of correct predictions on training data
- Average Previous Task Accuracy: How well the model still performs on old tasks
- Forgetting: How much accuracy was lost on previous tasks (lower is better)
Reference: Parisi et al. “Continual Lifelong Learning with Neural Networks: A Review” (2019)
Constructors
| Constructor | Summary |
|---|---|
ContinualLearningResult(int taskId, T trainingLoss, T trainingAccuracy, T averagePreviousTaskAccuracy, TimeSpan trainingTime, Vector<T> lossHistory, Vector<T> regularizationLossHistory) |
Initializes a new instance of the ContinualLearningResult class. |
Properties
| Property | Summary |
|---|---|
IReadOnlyDictionary<string, object> StrategyMetrics { get; set; } |
Gets additional strategy-specific metrics. |
T AveragePreviousTaskAccuracy { get; } |
Gets the average accuracy on all previously learned tasks after training on this task. |
T EffectiveLearningRate { get; set; } |
Gets the effective learning rate used (may vary with schedulers). |
T Forgetting { get; set; } |
Gets the amount of forgetting on previous tasks (accuracy drop). |
T ForwardTransfer { get; set; } |
Gets the forward transfer metric. |
T TrainingAccuracy { get; } |
Gets the final training accuracy on this task. |
T TrainingLoss { get; } |
Gets the final training loss on this task. |
T ValidationAccuracy { get; set; } |
Gets the validation accuracy on this task, if validation was performed. |
T ValidationLoss { get; set; } |
Gets the validation loss on this task, if validation was performed. |
TimeSpan TrainingTime { get; } |
Gets the time taken to train on this task. |
Vector<T> LossHistory { get; } |
Gets the loss history across training epochs. |
Vector<T> RegularizationLossHistory { get; } |
Gets the regularization loss history (e.g., EWC penalty term). |
int TaskId { get; } |
Gets the task identifier (0-indexed). |
int? GradientUpdates { get; set; } |
Gets the number of gradient updates performed. |
int? SampleCount { get; set; } |
Gets the number of samples used for training. |
long? PeakMemoryBytes { get; set; } |
Gets the peak memory usage during training in bytes. |
Methods
| Method | Summary |
|---|---|
string ToString() |
Returns a string representation of the training result. |