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

# Classification

> Learn about TabPFN's classification capabilities.

TabPFN provides a comprehensive interface for handling classification tasks on tabular data. The [`TabPFNClassifier`](https://github.com/PriorLabs/tabpfn/blob/main/src/tabpfn/classifier.py) class can be used for binary and multi-class classification problems.

## Getting Started

The following shows a full example of using the `TabPFNClassifier`:

```python theme={null}
from tabpfn import TabPFNClassifier
from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score, log_loss

X, y = load_breast_cancer(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)

model = TabPFNClassifier()
# To use TabPFNv2:
# model = TabPFNClassifier.create_default_for_version(ModelVersion.V2)
model.fit(X_train, y_train)

# Predict class labels
preds = model.predict(X_test)
print("Accuracy:", accuracy_score(y_test, preds))

# Predict class probabilities
probs = model.predict_proba(X_test)
print("Log-Loss:", log_loss(y_test, probs))
```

## Related Extensions

> [card] [Many Class Classifier](https://docs.priorlabs.ai/capabilities/many-class.md)
>
> Scalable classification for thousands of classes with TabPFN.

> [card] [Metric Tuning](https://docs.priorlabs.ai/capabilities/metric-tuning)
>
> Tune scores other than maximum probability prediction such as F1 or balanced accuracy.

## Python reference

* Local: [`TabPFNClassifier.predict_proba`](https://docs.priorlabs.ai/api-reference/python/tabpfn/classifier/fitting-and-prediction#predict-proba).
* API client: [`TabPFNClassifier.predict_proba`](https://docs.priorlabs.ai/api-reference/python/tabpfn-client/classifier/fitting-and-prediction#predict-proba).


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