Skip to content

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

  1. Installation — get set up in 30 seconds
  2. Quick Start — train your first uncertainty-aware model
  3. Core Concepts — learn the vocabulary (aleatoric vs epistemic, proper scoring rules, conformal coverage)
  4. User Guide — task-oriented walkthrough
  1. Method Selection Matrix — find the right loss for your problem
  2. Losses Catalogue — browse the implemented loss families
  3. Examples — runnable comparison scripts
  4. API Reference — complete signatures
  1. Mathematical Foundations — notation, NLL duality, proper scoring rules, proofs
  2. Methods Reference — conformal theory, ensemble decomposition, EIV algorithms
  3. Reports — benchmark evidence, adoption audits
  4. API Reference — full function signatures with source