Table of Contents

Class UncertaintyPredictionResult<T, TOutput>

Namespace
AiDotNet.Models.Results
Assembly
AiDotNet.dll

Represents a prediction result augmented with uncertainty information.

public sealed class UncertaintyPredictionResult<T, TOutput>

Type Parameters

T

The numeric type used for uncertainty computations (e.g., float, double).

TOutput

The model's output type (e.g., Tensor<T>).

Inheritance
UncertaintyPredictionResult<T, TOutput>
Inherited Members

Remarks

This type is returned by the facade method AiModelResult.PredictWithUncertainty(...).

For Beginners: This lets you ask the model both: - "What is the prediction?" - "How uncertain is that prediction?"

Constructors

UncertaintyPredictionResult(UncertaintyQuantificationMethod, TOutput, TOutput?, IReadOnlyDictionary<string, Tensor<T>>, RegressionConformalInterval<TOutput>?, ClassificationConformalPredictionSet?)

Initializes a new instance of the UncertaintyPredictionResult<T, TOutput> class.

public UncertaintyPredictionResult(UncertaintyQuantificationMethod methodUsed, TOutput prediction, TOutput? variance, IReadOnlyDictionary<string, Tensor<T>> metrics, RegressionConformalInterval<TOutput>? regressionInterval = null, ClassificationConformalPredictionSet? classificationSet = null)

Parameters

methodUsed UncertaintyQuantificationMethod
prediction TOutput
variance TOutput
metrics IReadOnlyDictionary<string, Tensor<T>>
regressionInterval RegressionConformalInterval<TOutput>
classificationSet ClassificationConformalPredictionSet

Properties

ClassificationSet

Gets an optional conformal classification prediction set, when configured and supported.

public ClassificationConformalPredictionSet? ClassificationSet { get; }

Property Value

ClassificationConformalPredictionSet

MethodUsed

Gets the uncertainty method that was used to produce this result.

public UncertaintyQuantificationMethod MethodUsed { get; }

Property Value

UncertaintyQuantificationMethod

Metrics

Gets additional uncertainty diagnostics.

public IReadOnlyDictionary<string, Tensor<T>> Metrics { get; }

Property Value

IReadOnlyDictionary<string, Tensor<T>>

Remarks

Keys are stable so downstream consumers do not need to branch on missing keys.

Prediction

Gets the point prediction (mean / expected prediction).

public TOutput Prediction { get; }

Property Value

TOutput

RegressionInterval

Gets an optional conformal regression interval, when configured and supported.

public RegressionConformalInterval<TOutput>? RegressionInterval { get; }

Property Value

RegressionConformalInterval<TOutput>

Variance

Gets the per-output predictive variance (when available).

public TOutput? Variance { get; }

Property Value

TOutput