Distribution-First Concepts¶
uncertainty_flow is built around one choice: predict() returns a DistributionPrediction object, not a point estimate. Every model family — conformal wrappers, tree models, neural nets, Bayesian, causal — converges to the same downstream contract.
The Two Workflows¶
Tabular regression: Wrap an existing sklearn estimator with ConformalRegressor for calibrated intervals on unordered feature tables.
Forecasting: Use ConformalForecaster, QuantileForestForecaster, or TransformerForecaster for ordered time series with temporal splits and multivariate joint uncertainty.
What DistributionPrediction Gives You¶
Every predict() call returns the same interface: quantile(), interval(), mean(), sample(), plot(). This means model switching is cheap, evaluation code is reusable, and downstream consumers ask for intervals, samples, or quantiles the same way every time.
Beyond Core Prediction¶
Once you have a fitted model, additional modules build on the same surface:
- Calibration:
.calibration_report()checks whether stated confidence matches empirical coverage. See ./calibration.md. - Decomposition:
EnsembleDecompositionseparates aleatoric from epistemic uncertainty via bootstrap refits. See ./models.md. - Feature leverage:
FeatureLeverageAnalyzerscores features by their impact on interval width. See ./models.md. - Risk control:
ConformalRiskControlcalibrates intervals to control expected loss rather than coverage. See ./models.md. - Counterfactuals:
UncertaintyExplainerfinds minimal feature changes that reduce uncertainty. See ./models.md.
Where To Go Next¶
- ../architecture/overview.md — package structure and data flow
- ./models.md — model selection, guarantee tradeoffs, and choosing quickly
- ./calibration.md — interpreting calibration reports and miscalibration response
- ./charting.md — plotting, intervals, samples, and visual inspection
- ../api/spec.md — full API specification