> ## 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 the model.

<Info>
  Looking for usage documentation? Check out [Regression](/capabilities/regression).
</Info>

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

  <a className="python-reference-source" href="https://github.com/PriorLabs/TabPFN/blob/c70b6ef0488858d32244c52222abfc0c5be207d6/src/tabpfn/regressor.py#L1220" aria-label="View source for TabPFNRegressor.fit"><span aria-hidden="true">\</></span> View source <span aria-hidden="true">↗</span></a>
</div>

Fit the model.

```python theme={null}
TabPFNRegressor.fit(
    X: XType,
    y: YType,
) -> Self
```

<Accordion title="Type aliases">
  ```python theme={null}
  XType = Any
  YType = Any
  ```
</Accordion>

**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://github.com/PriorLabs/TabPFN/blob/c70b6ef0488858d32244c52222abfc0c5be207d6/src/tabpfn/constants.py#L25">X<wbr />Type</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://github.com/PriorLabs/TabPFN/blob/c70b6ef0488858d32244c52222abfc0c5be207d6/src/tabpfn/constants.py#L26">Y<wbr />Type</a></code> | Required | The target variable. |
</div>

**Returns**

<div className="python-reference-table python-reference-returns">
  | Type | Description |
  | - | - |
  | <code className="python-reference-type"><a href="/api-reference/python/tabpfn/regressor/configuration#constructor">Self</a></code> | self |
</div>

***

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

  <a className="python-reference-source" href="https://github.com/PriorLabs/TabPFN/blob/c70b6ef0488858d32244c52222abfc0c5be207d6/src/tabpfn/regressor.py#L1343" aria-label="View source for TabPFNRegressor.predict"><span aria-hidden="true">\</></span> View source <span aria-hidden="true">↗</span></a>
</div>

Runs the forward() method and then transform the logits
from the binning space in order to predict target variable.

```python theme={null}
TabPFNRegressor.predict(
    X: XType,
    *,
    output_type: OutputType = "mean",
    quantiles: list[float] | None = None,
) -> RegressionResultType
```

<Accordion title="Overloaded signatures">
  ```python theme={null}
  TabPFNRegressor.predict(
      X: XType,
      *,
      output_type: Literal["mean", "median", "mode"] = "mean",
      quantiles: list[float] | None = None,
  ) -> np.ndarray
  ```

  ```python theme={null}
  TabPFNRegressor.predict(
      X: XType,
      *,
      output_type: Literal["quantiles"],
      quantiles: list[float] | None = None,
  ) -> list[np.ndarray]
  ```

  ```python theme={null}
  TabPFNRegressor.predict(
      X: XType,
      *,
      output_type: Literal["main"],
      quantiles: list[float] | None = None,
  ) -> MainOutputDict
  ```

  ```python theme={null}
  TabPFNRegressor.predict(
      X: XType,
      *,
      output_type: Literal["full"],
      quantiles: list[float] | None = None,
  ) -> FullOutputDict
  ```
</Accordion>

<Accordion title="Type aliases">
  ```python theme={null}
  XType = Any
  OutputType = Literal["mean", "median", "mode", "quantiles", "full", "main"]
  RegressionResultType = np.ndarray | list[np.ndarray] | MainOutputDict | FullOutputDict
  ```
</Accordion>

**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://github.com/PriorLabs/TabPFN/blob/c70b6ef0488858d32244c52222abfc0c5be207d6/src/tabpfn/constants.py#L25">X<wbr />Type</a></code> | Required | The input data. |
  | <span id="predict--output-type" /><code className="python-reference-parameter">output\_<wbr />type</code> | <code className="python-reference-type"><a href="https://github.com/PriorLabs/TabPFN/blob/c70b6ef0488858d32244c52222abfc0c5be207d6/src/tabpfn/regressor.py#L151">Output<wbr />Type</a></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 the all output types above in a dict.<br />- If `"full"`, we return the full output of the model, including the   logits and the criterion, and all the output types from "main". |
  | <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="quantiles"`.<br /><br />By default, the `[0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]` quantiles are returned. The predictions per quantile match the input order. |
</div>

**Returns**

<div className="python-reference-table python-reference-returns">
  | Type | Description |
  | - | - |
  | <code className="python-reference-type"><a href="https://github.com/PriorLabs/TabPFN/blob/c70b6ef0488858d32244c52222abfc0c5be207d6/src/tabpfn/regressor.py#L171">Regression<wbr />Result<wbr />Type</a></code> | The prediction, which can be a numpy array, a list of arrays (for quantiles), or a dictionary with detailed outputs. |
</div>

## Scikit-learn scoring

See inherited [`score`](https://scikit-learn.org/stable/modules/generated/sklearn.base.RegressorMixin.html#sklearn.base.RegressorMixin.score).


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