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

> [!NOTE]
>
> Looking for usage documentation? Check out [Classification](https://docs.priorlabs.ai/capabilities/classification.md).

## `TabPFNClassifier.fit`

[ View source ](https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/classifier.py#L958)

Fit the model.

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

> [accordion] Type aliases
>
> ```python theme={null}
> XType = Any
> YType = Any
> ```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `X` | `XType` | Required | The input data. |
| `y` | `YType` | Required | The target variable. |

**Returns**

| Type | Description |
| - | - |
| `Self` | self |

***

## `TabPFNClassifier.predict`

[ View source ](https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/classifier.py#L1657)

Predict the class labels for the provided input samples.

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

> [accordion] Type aliases
>
> ```python theme={null}
> XType = Any
> ```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `X` | `XType` | Required | The input data for prediction. |

**Returns**

| Type | Description |
| - | - |
| `np.ndarray` | The predicted class labels as a NumPy array. |

***

## `TabPFNClassifier.predict_logits`

[ View source ](https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/classifier.py#L1673)

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] Type aliases
>
> ```python theme={null}
> XType = Any
> ```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `X` | `XType` | Required | The input data for prediction. |

**Returns**

| Type | Description |
| - | - |
| `np.ndarray` | The predicted logits as a NumPy array. Shape (n\_samples, n\_classes). |

***

## `TabPFNClassifier.predict_raw_logits`

[ View source ](https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/classifier.py#L1689)

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`](https://docs.priorlabs.ai/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] Type aliases
>
> ```python theme={null}
> XType = Any
> ```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `X` | `XType` | Required | The input data for prediction. |

**Returns**

| Type | Description |
| - | - |
| `np.ndarray` | An array of predicted logits for each estimator, Shape (n\_estimators, n\_samples, n\_classes). |

***

## `TabPFNClassifier.predict_proba`

[ View source ](https://github.com/PriorLabs/TabPFN/blob/f02b3b5941717472eafd078c15ae2043676b3fcf/src/tabpfn/classifier.py#L1712)

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] Type aliases
>
> ```python theme={null}
> XType = Any
> ```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `X` | `XType` | Required | The input data for prediction. |

**Returns**

| Type | Description |
| - | - |
| `np.ndarray` | The predicted probabilities of the classes as a NumPy array. Shape (n\_samples, n\_classes). |

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