Start Here¶
Welcome to torchregress — a PyTorch library for regression with built-in uncertainty estimation.
The library answers one question well: given inputs \(x\), what can be said about the conditional distribution \(p(y \mid x)\) rather than only its mean? Every feature is a way to represent, train, calibrate, or evaluate some part of that distribution:
| You want | Representation | Where to start |
|---|---|---|
| A point prediction | \(\hat{y}(x)\) | Standard losses |
| A mean and a variance | \(\mathcal{N}(\hat{y}(x), \hat{\sigma}^2(x))\) | Gaussian losses |
| A full density | \(p_\theta(y \mid x)\) (mixture, flow, basis) | MDN, flows |
| An interval with a guarantee | \([L(x), U(x)]\) with \(P(Y \in [L,U]) \ge 1-\alpha\) | Conformal prediction |
| A calibrated uncertainty score | recalibrated \(\hat{\sigma}^2(x)\) | Post-hoc calibration |
Point forecasts are a special case (a Dirac distribution), which is why the same NLL reduction and scoring-rule contracts run through the whole library.
Choose Your Path¶
- Installation — get set up in 30 seconds
- Quick Start — train your first uncertainty-aware model
- Core Concepts — learn the vocabulary (aleatoric vs epistemic, proper scoring rules, conformal coverage)
- User Guide — task-oriented walkthrough
- Method Selection Matrix — find the right loss for your problem
- Losses Catalogue — browse the implemented loss families
- Examples — runnable comparison scripts
- API Reference — complete signatures
- Mathematical Foundations — notation, NLL duality, proper scoring rules, proofs
- Methods Reference — conformal theory, ensemble decomposition, EIV algorithms
- Reports — benchmark evidence, adoption audits
- API Reference — full function signatures with source