EvaluationResult class
A collection of EvaluationMetrics representing the result of an evaluation run.
- Annotations
-
- @Source(name: 'EvaluationResult.cs', namespace: 'Microsoft.Extensions.AI.Evaluation', repository: 'dotnet/extensions', path: 'src/Libraries/Microsoft.Extensions.AI.Evaluation/')
Constructors
-
EvaluationResult({Map<
String, EvaluationMetric> ? metrics}) -
Creates an EvaluationResult with the given
metricsmap, or an empty map ifmetricsis null. -
EvaluationResult.fromList(Iterable<
EvaluationMetric> metrics) -
Creates an EvaluationResult from a flat list of metrics (keyed by
EvaluationMetric.name).
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
metrics
→ Map<
String, EvaluationMetric> -
Metrics keyed by EvaluationMetric.name.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getValue<
T extends EvaluationMetric> (String metricName) → T -
Returns the metric named
metricNamecast toT. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
tryGet<
T extends EvaluationMetric> (String metricName) → (bool, T?) -
Returns the metric named
metricNamecast toT, or null if not found.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited