Views
No views yet
pip install tabpfn1from sklearn.datasets import load_breast_cancer
2from sklearn.model_selection import train_test_split
3from tabpfn import TabPFNClassifier
4
5# Load data
6X, y = load_breast_cancer(return_X_y=True)
7X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5, random_state=42)
8
9# Initialize a classifier
10clf = TabPFNClassifier() # Uses TabPFN 2.5 weights, finetuned on real data.
11clf.fit(X_train, y_train)
12
13
14# Predict probabilities
15prediction_probabilities = clf.predict_proba(X_test)
16# Predict labels
17predictions = clf.predict(X_test)
18print("Accuracy", accuracy_score(y_test, predictions))tabpfn-v2.5-classifier-v2.5_default.ckpt and tabpfn-v2.5-regressor-v2.5_default.ckpt), the other available checkpoints are experimental and worse on average, and we recommend to always start with the defaults.
They can be used as part of an ensembling or hyperparameter optimization system (and are used automatically in AutoTabPFN here) or tried out manually.
Their name suffixes refer to what we expect them to be good at.tabpfn-v2.5-classifier-v2.5_default.ckpt 🌍: default classification checkpoint, finetuned on real-data.tabpfn-v2.5-classifier-v2.5_default-2.ckpt: best classification synthetic checkpoint. Use this to get the default TabPFN-2.5 classification model without real-data finetuning.tabpfn-v2.5-classifier-v2.5_large-features-L.ckpt: specialized for larger features (up to 500) and small samples (< 5K).tabpfn-v2.5-classifier-v2.5_large-features-XL.ckpt: specialized for larger features (up to 1000, could support max_features_per_estimator=1000).tabpfn-v2.5-classifier-v2.5_large-samples.ckpt: specialized for larger sample sizes (larger than 30K)tabpfn-v2.5-classifier-v2.5_real.ckpt 🌍: other real-data finetuned classification checkpoint. Pretty good overall but bad on large features (>100-200).tabpfn-v2.5-classifier-v2.5_real-large-features.ckpt 🌍: other real-data finetuned classification checkpoint, worse on large samples (> 10K)tabpfn-v2.5-classifier-v2.5_real-large-samples-and-features.ckpt 🌍: identical to tabpfn-v2.5-classifier-v2.5_default.ckpttabpfn-v2.5-classifier-v2.5_variant.ckpt: pretty good but bad on large features (> 100-200).tabpfn-v2.5-regressor-v2.5_default.ckpt: default regression checkpoint, trained on synthetic data only.tabpfn-v2.5-regressor-v2.5_low-skew.ckpt: variant specialized at low target skew data (but quite bad on average).tabpfn-v2.5-regressor-v2.5_quantiles.ckpt: variant which might be interesting for quantile / distribution estimation, though the default should still be prioritized for this.tabpfn-v2.5-regressor-v2.5_real.ckpt 🌍: finetuned on real-data. Best checkpoint among the checkpoints finetuned on real data. For regression we recommend the synthetic-only checkpoint as a default, but this checkpoint is quite a bit better on some datasets.tabpfn-v2.5-regressor-v2.5_real-variant.ckpt 🌍: other regression variant finetuned on real data.tabpfn-v2.5-regressor-v2.5_small-samples.ckpt: variant slightly better on small (< 3K) samples.tabpfn-v2.5-regressor-v2.5_variant.ckpt: other variant, no clear specialty but can be better on a few datasets.@misc{TabPFN-2.5,\
title={TabPFN-2.5: Advancing the State of the Art in\
Tabular Foundation Models},\
author={Léo Grinsztajn and Klemens Flöge and Oscar Key and Felix Birkel and Brendan Roof and Phil Jund and Benjamin Jäger and Adrian Hayler and Dominik Safaric and Simone Alessi, Felix Jablonski and Mihir Manium and Rosen Yu and Anurag Garg and Jake Robertson and Shi Bin (Liam) Hoo and Vladyslav Moroshan and Magnus Bühler and Lennart Purucker and Clara Cornu and Lilly Charlotte Wehrhahn and Alessandro Bonetto and Sauraj Gambhir and Noah Hollmann and Frank Hutter},\
year={2025}\
}