Skip to main content
TabPFN can be applied to regression tasks using the TabPFNRegressor class. Instead of a single point estimate, the regressor predicts an output distribution, enabling you to generate different types of forecasts and accurately measure uncertainty in your predictions.

Getting Started

The following shows a full example of using the TabPFNRegressor:

Understanding Predictions

The TabPFNRegressor.predict() method can return different types of predictions based on the output_type parameter.

Point Predictions (Mean, Median, Mode)

By default, predict() returns the mean of the predicted distribution. You can also request the median or mode for different point estimates.

Quantile Regression

To perform quantile regression and get predictions for specific quantiles, set output_type="quantiles" and pass a list of desired quantiles. This is ideal for estimating prediction intervals.

Full Distribution

For advanced use cases, you can retrieve the full predictive distribution.
  • output_type="main" returns a dictionary containing the mean, median, mode, and default quantiles.
  • output_type="full" returns everything in "main" plus the raw logits and criterion object, allowing for custom loss calculations (see the FAQ).
TabPFNRegressor provides a full predictive distribution, enabling loss-aware predictions without retraining. You can compute the Bayes-optimal point prediction that minimizes the expected custom loss. This method gives flexible custom-loss predictions without modifying the model.

Predictive Distribution

Deep dive into the bar distribution: visualize uncertainty, extract quantiles, and handle multimodal posteriors.

Interpretability

Explain TabPFN predictions with SHAP utilities.