softmax_temperature
Controls prediction sharpness (classification only):- Lower values (e.g.,
0.7): sharper, more confident predictions — useful when accuracy is already high - Higher values (e.g.,
1.2): softer, more calibrated predictions — useful when probability calibration matters
If you use
tuning_config={"calibrate_temperature": True}, the temperature is tuned automatically and overrides this value.Metric Tuning
For metrics that are sensitive to decision thresholds (F1, balanced accuracy, precision, recall), use the built-in metric tuning:Handling Imbalanced Data
- Set
balance_probabilities=Trueas a quick heuristic for imbalanced datasets when your evaluation metric weights each class equally regardless of its frequency (e.g. balanced accuracy, balanced log loss). - For more control, use
eval_metric="balanced_accuracy"with threshold tuning
n_estimators and auto_scale_n_estimators
n_estimators controls the number of ensemble members (default 8). Each estimator uses a different preprocessing configuration, contributing to ensemble diversity and robustness.
By default (auto_scale_n_estimators=True), TabPFN automatically increases n_estimators on wide datasets to ensure full feature coverage — the actual count is capped at 32. To use exactly the number you specify without any auto-scaling, set auto_scale_n_estimators=False:
Disabling auto-scaling is useful when you need a fixed, predictable computational budget or when comparing models with a controlled number of estimators.