Table of Contents

Class TaskEvaluationResult<T>

Namespace
AiDotNet.ContinualLearning.Results
Assembly
AiDotNet.dll

Result from evaluating model performance on a single task.

public class TaskEvaluationResult<T>

Type Parameters

T

The numeric type used for calculations.

Inheritance
TaskEvaluationResult<T>
Inherited Members

Remarks

For Beginners: This class captures how well the model performs on a specific task at a point in time. It's used to track whether the model remembers what it learned.

Constructors

TaskEvaluationResult(int, T, T)

Initializes a new instance of the TaskEvaluationResult<T> class.

public TaskEvaluationResult(int taskId, T accuracy, T loss)

Parameters

taskId int
accuracy T
loss T

Properties

Accuracy

Gets the accuracy on this task.

public T Accuracy { get; }

Property Value

T

AdditionalMetrics

Gets additional metrics like F1-score, precision, recall.

public IReadOnlyDictionary<string, T>? AdditionalMetrics { get; init; }

Property Value

IReadOnlyDictionary<string, T>

ConfidenceScores

Gets the confidence scores for predictions, if available.

public Vector<T>? ConfidenceScores { get; init; }

Property Value

Vector<T>

ConfusionMatrix

Gets the confusion matrix, if available.

public IReadOnlyDictionary<(int Predicted, int Actual), int>? ConfusionMatrix { get; init; }

Property Value

IReadOnlyDictionary<(int Predicted, int Actual), int>

Remarks

Key format: (predicted, actual) -> count

CorrectCount

Gets the number of correct predictions.

public int? CorrectCount { get; init; }

Property Value

int?

EvaluationTime

Gets the evaluation time.

public TimeSpan? EvaluationTime { get; init; }

Property Value

TimeSpan?

Loss

Gets the loss on this task.

public T Loss { get; }

Property Value

T

PerClassAccuracy

Gets per-class accuracy breakdown, if available.

public IReadOnlyDictionary<int, T>? PerClassAccuracy { get; init; }

Property Value

IReadOnlyDictionary<int, T>

SampleCount

Gets the number of samples evaluated.

public int? SampleCount { get; init; }

Property Value

int?

TaskId

Gets the task identifier (0-indexed).

public int TaskId { get; }

Property Value

int

Methods

ToString()

Returns a string representation of the evaluation result.

public override string ToString()

Returns

string