英語で読む

次の方法で共有


NumericMetric Class

Definition

An EvaluationMetric containing a numeric value.

C#
public sealed class NumericMetric : Microsoft.Extensions.AI.Evaluation.EvaluationMetric<double?>
Inheritance

Remarks

NumericMetric can be used to represent any numeric value. The underlying type of a NumericMetric's value is double. However, it can be used to represent any type of numeric value including int, long, float etc.

A common use case for NumericMetric is to represent numeric scores that fall within a well defined range. For example, it can be used to represent a score between 1 and 5, where 1 is considered a poor score, and 5 is considered an excellent score.

Constructors

Properties

Diagnostics

Gets or sets a collection of zero or more EvaluationDiagnostics associated with the current EvaluationMetric.

(Inherited from EvaluationMetric)
Interpretation

Gets or sets an EvaluationMetricInterpretation that identifies whether the result of the evaluation represented by the current EvaluationMetric is considered good or bad, passed or failed etc.

(Inherited from EvaluationMetric)
Name

Gets or sets the name of the EvaluationMetric.

(Inherited from EvaluationMetric)
Value

Gets or sets the value of the EvaluationMetric<T>.

(Inherited from EvaluationMetric<T>)

Methods

Extension Methods

ContainsDiagnostics(EvaluationMetric, Func<EvaluationDiagnostic,Boolean>)

Returns true if the supplied metric contains any EvaluationDiagnostic matching the supplied predicate; false otherwise.

Applies to

製品 バージョン
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)