> ## Documentation Index
> Fetch the complete documentation index at: https://docs.priorlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> TabPFN-3 and later versions support up to 1,000,000 rows, subject to feature count and checkpoint/API limits.
> For large datasets, use per-estimator subsampling, e.g. inference_config={"SUBSAMPLE_SAMPLES": 100_000}, in TabPFNClassifier or TabPFNRegressor from tabpfn or tabpfn_client.
> Pass raw pandas DataFrames to fit and predict. Categorical strings/categories, raw text, and missing feature values are handled automatically; no manual integer/one-hot encoding, imputation, scaling, or outlier removal is needed.

# Fitting and prediction

> Fit, predict, and inspect server timings with TabPFNRegressor.

<Info>
  Looking for usage documentation? Check out [Regression](/capabilities/regression) and [KV cache](/capabilities/kv-cache).
</Info>

<div className="python-reference-heading">
  <h2 id="fit">
    `TabPFNRegressor.fit`
  </h2>

  <a className="python-reference-source" href="https://github.com/PriorLabs/tabpfn-client/blob/5f8aee56ad2a788458704c342347e9bc282cebe9/src/tabpfn_client/estimator.py#L881" aria-label="View source for TabPFNRegressor.fit"><span aria-hidden="true">\</></span> View source <span aria-hidden="true">↗</span></a>
</div>

Fit the model.

Uploads the training data to the server, which fits the model on it.

```python theme={null}
TabPFNRegressor.fit(
    X: pd.DataFrame | np.ndarray,
    y: pd.Series | np.ndarray,
    description: str | None = None,
)
```

**Parameters**

<div className="python-reference-table">
  | Parameter | Type | Default | Description |
  | - | - | - | - |
  | <span id="fit-x" /><code className="python-reference-parameter">X</code> | <code className="python-reference-type"><a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html">pd.Data<wbr />Frame</a> \| <a href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html">np.ndarray</a></code> | Required | The input data. |
  | <span id="fit-y" /><code className="python-reference-parameter">y</code> | <code className="python-reference-type"><a href="https://pandas.pydata.org/docs/reference/api/pandas.Series.html">pd.Series</a> \| <a href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html">np.ndarray</a></code> | Required | The target variable. |
  | <span id="fit-description" /><code className="python-reference-parameter">description</code> | <code className="python-reference-type">str \| None</code> | `None` | Description of the dataset and task for the server. |
</div>

**Returns**

<div className="python-reference-table python-reference-returns">
  | Type | Description |
  | - | - |
  | — | self |
</div>

**Raises**

`ValueError`

If the data or the estimator's parameters are invalid,
or the data exceeds the model limits.

***

<div className="python-reference-heading">
  <h2 id="predict">
    `TabPFNRegressor.predict`
  </h2>

  <a className="python-reference-source" href="https://github.com/PriorLabs/tabpfn-client/blob/5f8aee56ad2a788458704c342347e9bc282cebe9/src/tabpfn_client/estimator.py#L954" aria-label="View source for TabPFNRegressor.predict"><span aria-hidden="true">\</></span> View source <span aria-hidden="true">↗</span></a>
</div>

Predict regression target for `X`.

```python theme={null}
TabPFNRegressor.predict(
    X: pd.DataFrame | np.ndarray,
    output_type: Literal["mean", "median", "mode", "quantiles", "full", "main"] = "mean",
    quantiles: list[float] | None = None,
) -> np.ndarray | list[np.ndarray] | dict[str, np.ndarray]
```

**Parameters**

<div className="python-reference-table">
  | Parameter | Type | Default | Description |
  | - | - | - | - |
  | <span id="predict-x" /><code className="python-reference-parameter">X</code> | <code className="python-reference-type"><a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html">pd.Data<wbr />Frame</a> \| <a href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html">np.ndarray</a></code> | Required | The input data, of shape (n\_samples, n\_features). |
  | <span id="predict-output-type" /><code className="python-reference-parameter">output\_<wbr />type</code> | <code className="python-reference-type">Literal\["mean", "median", "mode", "quantiles", "full", "main"]</code> | `"mean"` | Determines the type of output to return.<br /><br />- If `"mean"`, we return the mean over the predicted distribution.<br />- If `"median"`, we return the median over the predicted   distribution.<br />- If `"mode"`, we return the mode over the predicted distribution.<br />- If `"quantiles"`, we return the quantiles of the predicted   distribution. The parameter `quantiles` determines which   quantiles are returned.<br />- If `"main"`, we return all the output types above in a dict.<br />- If `"full"`, we return the full output of the model, including   the logits, the borders and all the output types from "main".   The criterion is included when the optional `tabpfn` and   `torch` packages are installed. |
  | <span id="predict-quantiles" /><code className="python-reference-parameter">quantiles</code> | <code className="python-reference-type">list\[float] \| None</code> | `None` | The quantiles to return if `output_type="quantiles"`. By default, the `[0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]` quantiles are returned. |
</div>

**Returns**

<div className="python-reference-table python-reference-returns">
  | Type | Description |
  | - | - |
  | <code className="python-reference-type"><a href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html">np.ndarray</a> \| list\[<a href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html">np.ndarray</a>] \| dict\[str, <a href="https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html">np.ndarray</a>]</code> | An array of predictions for `"mean"`, `"median"` and `"mode"`; a list with one array per quantile for `"quantiles"`; a dict of arrays for `"main"` and `"full"`. |
</div>

**Raises**

`ValueError`

If `X` exceeds the model limits or the group columns are
invalid.

`RuntimeError`

If a `"full"` prediction split across several requests
returns fields that cannot be combined.

***

<div className="python-reference-heading">
  <h2 id="get-timings">
    `TabPFNRegressor.get_timings`
  </h2>

  <a className="python-reference-source" href="https://github.com/PriorLabs/tabpfn-client/blob/5f8aee56ad2a788458704c342347e9bc282cebe9/src/tabpfn_client/estimator.py#L131" aria-label="View source for TabPFNRegressor.get_timings"><span aria-hidden="true">\</></span> View source <span aria-hidden="true">↗</span></a>
</div>

Seconds the server spent on the last fit and the last prediction.

Returns `{"fit": ..., "predict": ...}`:

* [`fit`](/api-reference/python/tabpfn-client/regressor/fitting-and-prediction#fit): `elapsed_s`, `queue_wait_s`, `train_set_transform_s`,
  `fit_s`.
* [`predict`](/api-reference/python/tabpfn-client/regressor/fitting-and-prediction#predict): `test_set_transform_queue_wait_s`,
  `test_set_transform_s`, `predict_queue_wait_s`, `predict_s`.
  A prediction sent in several requests reports their sum.

Queue wait is time spent waiting for the server to start the work. An
entry is `None` before the first call, on a model restored with
[`load_model()`](/api-reference/python/tabpfn-client/regressor/model-selection-and-persistence#load-model), and when the server does not report timings.

```python theme={null}
TabPFNRegressor.get_timings() -> dict[str, dict[str, Any] | None]
```

**Returns**

<div className="python-reference-table python-reference-returns">
  | Type | Description |
  | - | - |
  | <code className="python-reference-type">dict\[str, dict\[str, Any] \| None]</code> | — |
</div>

***

<div className="python-reference-heading">
  <h2 id="last-predict-timings">
    `TabPFNRegressor.last_predict_timings`
  </h2>

  <a className="python-reference-source" href="https://github.com/PriorLabs/tabpfn-client/blob/5f8aee56ad2a788458704c342347e9bc282cebe9/src/tabpfn_client/estimator.py#L127" aria-label="View source for TabPFNRegressor.last_predict_timings"><span aria-hidden="true">\</></span> View source <span aria-hidden="true">↗</span></a>
</div>

Seconds per stage of the most recent prediction, or `None`.

**Returns**

<div className="python-reference-table python-reference-returns">
  | Type | Description |
  | - | - |
  | <code className="python-reference-type">dict\[str, Any] \| None</code> | — |
</div>

## Scikit-learn scoring

Inherited [`score(X, y, sample_weight=None)`](https://scikit-learn.org/stable/modules/generated/sklearn.base.RegressorMixin.html#sklearn.base.RegressorMixin.score) calls `predict` and returns the coefficient of determination (`R²`).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.