Class UncertaintyQuantificationOptions
Configuration options for enabling uncertainty quantification during inference.
public sealed class UncertaintyQuantificationOptions
- Inheritance
-
UncertaintyQuantificationOptions
- Inherited Members
Remarks
Uncertainty quantification (UQ) augments standard point predictions with an uncertainty estimate. For supported model types, the library can sample multiple stochastic predictions and aggregate them into a mean prediction and an uncertainty estimate (variance).
For Beginners: This lets you ask the model not only "what is the prediction?" but also "how sure are you?"
Properties
AdaptiveConformalBins
Gets or sets the number of confidence bins used when ConformalMode is Adaptive.
public int AdaptiveConformalBins { get; set; }
Property Value
CalibrationMethod
Gets or sets the probability calibration method used when calibration labels are provided.
public ProbabilityCalibrationMethod CalibrationMethod { get; set; }
Property Value
ConformalConfidenceLevel
Gets or sets the desired conformal coverage level when using conformal prediction.
public double ConformalConfidenceLevel { get; set; }
Property Value
Remarks
This is typically expressed as a probability (e.g., 0.9 for 90% coverage).
ConformalMode
Gets or sets the conformal calibration mode used when producing conformal intervals/sets.
public ConformalPredictionMode ConformalMode { get; set; }
Property Value
Remarks
Split conformal is the standard baseline. Cross-conformal can improve stability on small calibration sets. Adaptive conformal adjusts thresholds based on predicted confidence buckets.
CrossConformalFolds
Gets or sets the number of folds used when ConformalMode is CrossConformal.
public int CrossConformalFolds { get; set; }
Property Value
DeepEnsembleInitialNoiseStdDev
Gets or sets the standard deviation of the initial parameter perturbation applied when constructing ensemble members.
public double DeepEnsembleInitialNoiseStdDev { get; set; }
Property Value
Remarks
This helps ensure ensemble members do not collapse to identical solutions when created from a shared base model.
DeepEnsembleSize
Gets or sets the number of independently trained models used for deep ensemble uncertainty estimation.
public int DeepEnsembleSize { get; set; }
Property Value
Remarks
This value is only used when Method is DeepEnsemble.
DenormalizeUncertainty
Gets or sets whether the returned uncertainty should be denormalized to match the output scale.
public bool DenormalizeUncertainty { get; set; }
Property Value
Remarks
When enabled, the library attempts to scale variances according to the output normalization transform. For non-linear normalization transforms, the uncertainty is returned in normalized space.
EnableIsotonicRegressionCalibration
Gets or sets whether to fit and apply isotonic regression calibration (binary calibration) when calibration labels are provided.
public bool EnableIsotonicRegressionCalibration { get; set; }
Property Value
EnablePlattScaling
Gets or sets whether to fit and apply Platt scaling (binary calibration) when calibration labels are provided.
public bool EnablePlattScaling { get; set; }
Property Value
EnableTemperatureScaling
Gets or sets whether to fit and apply temperature scaling for classification-like outputs when calibration labels are provided.
public bool EnableTemperatureScaling { get; set; }
Property Value
Remarks
When enabled and calibration labels are provided via the builder, the system will calibrate predicted probabilities and return calibrated probabilities as the prediction output from uncertainty APIs.
Enabled
Gets or sets whether uncertainty quantification is enabled.
public bool Enabled { get; set; }
Property Value
Remarks
When disabled, calls to uncertainty APIs fall back to deterministic behavior.
LaplacePriorPrecision
Gets or sets the prior precision (inverse variance) used by diagonal Laplace approximation.
public double LaplacePriorPrecision { get; set; }
Property Value
Method
Gets or sets the uncertainty quantification strategy to use.
public UncertaintyQuantificationMethod Method { get; set; }
Property Value
MonteCarloDropoutRate
Gets or sets the dropout rate used when injecting Monte Carlo Dropout layers automatically.
public double MonteCarloDropoutRate { get; set; }
Property Value
Remarks
This value is only used when the model architecture does not already contain explicit MC dropout layers.
NumSamples
Gets or sets the number of stochastic samples to draw when using sampling-based methods.
public int NumSamples { get; set; }
Property Value
Remarks
Higher values generally improve estimate stability at the cost of increased inference latency.
PosteriorFitMaxSamples
Gets or sets the maximum number of samples used to fit Laplace/SWAG posteriors from calibration data.
public int PosteriorFitMaxSamples { get; set; }
Property Value
Remarks
This is a safety/performance bound to prevent extremely large calibration datasets from causing very slow builds.
RandomSeed
Gets or sets an optional random seed for reproducible Monte Carlo sampling.
public int? RandomSeed { get; set; }
Property Value
- int?
SwagBurnInSteps
Gets or sets the number of initial SWAG steps to skip before collecting snapshots.
public int SwagBurnInSteps { get; set; }
Property Value
SwagLearningRate
Gets or sets the learning rate used for SWAG posterior fitting on calibration data.
public double SwagLearningRate { get; set; }
Property Value
SwagNumSnapshots
Gets or sets the number of SWAG snapshots to collect when fitting a SWAG posterior.
public int SwagNumSnapshots { get; set; }
Property Value
SwagNumSteps
Gets or sets the number of SWAG update steps used to collect snapshots.
public int SwagNumSteps { get; set; }