> ## 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 [Classification](/capabilities/classification).
</Info>

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

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

Fit the model.

```python theme={null}
TabPFNClassifier.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/classifier/configuration#constructor">Self</a></code> | self |
</div>

***

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

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

Predict the class labels for the provided input samples.

```python theme={null}
TabPFNClassifier.predict(
    X: XType,
) -> np.ndarray
```

<Accordion title="Type aliases">
  ```python theme={null}
  XType = Any
  ```
</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 for prediction. |
</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></code> | The predicted class labels as a NumPy array. |
</div>

***

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

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

Predict the raw logits for the provided input samples.

Logits represent the unnormalized log-probabilities of the classes
before the softmax activation function is applied.

```python theme={null}
TabPFNClassifier.predict_logits(
    X: XType,
) -> np.ndarray
```

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

**Parameters**

<div className="python-reference-table">
  | Parameter | Type | Default | Description |
  | - | - | - | - |
  | <span id="predict-logits--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 for prediction. |
</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></code> | The predicted logits as a NumPy array. Shape (n\_samples, n\_classes). |
</div>

***

<div className="python-reference-heading">
  <h2 id="predict-raw-logits">
    `TabPFNClassifier.predict_raw_logits`
  </h2>

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

Predict the raw logits for the provided input samples.

Logits represent the unnormalized log-probabilities of the classes
before the softmax activation function is applied. In contrast to the
[`predict_logits`](/api-reference/python/tabpfn/classifier/fitting-and-prediction#predict-logits) method, this method returns the raw logits for each
estimator, without averaging estimators or temperature scaling.

```python theme={null}
TabPFNClassifier.predict_raw_logits(
    X: XType,
) -> np.ndarray
```

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

**Parameters**

<div className="python-reference-table">
  | Parameter | Type | Default | Description |
  | - | - | - | - |
  | <span id="predict-raw-logits--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 for prediction. |
</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></code> | An array of predicted logits for each estimator, Shape (n\_estimators, n\_samples, n\_classes). |
</div>

***

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

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

Predict the probabilities of the classes for the provided input samples.

This is a wrapper around the `_predict_proba` method.

```python theme={null}
TabPFNClassifier.predict_proba(
    X: XType,
) -> np.ndarray
```

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

**Parameters**

<div className="python-reference-table">
  | Parameter | Type | Default | Description |
  | - | - | - | - |
  | <span id="predict-proba--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 for prediction. |
</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></code> | The predicted probabilities of the classes as a NumPy array. Shape (n\_samples, n\_classes). |
</div>

## Scikit-learn scoring

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


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