The Many Class Classifier Extension allows TabPFN to handle classification problems with more classes than the base checkpoint’s native limit.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.
ManyClassClassifier auto-detects this limit from the base estimator’s MAX_NUMBER_OF_CLASSES — currently 10 for TabPFN-2.5 / TabPFN-2.6 and 160 for TabPFN-3 — so the wrapper transparently picks up future checkpoints with higher limits.
It works through an error-correcting output code (ECOC) approach that:
- Encodes the multi-class task into multiple binary or small-class subtasks.
- Trains the base
TabPFNClassifieron these subtasks. - Decodes the results back into the original class space.
Getting Started
Install themany_class extension:
TabPFNClassifier with ManyClassClassifier to enable support for datasets with large number of classes.
Key parameters
All parameters below are optional — sensible defaults are used if they are not provided.alphabet_size— number of classes each sub-estimator is trained on. Leave unset (the default) so it is inferred from the base estimator’sMAX_NUMBER_OF_CLASSES(read offestimator.get_inference_config()). With this, future TabPFN checkpoints that support more classes per sub-task are picked up automatically. If you set it explicitly, do not exceed the base estimator’s limit (10 for TabPFN-2.5 / TabPFN-2.6, 160 for TabPFN-3).n_estimators_redundancy— redundancy multiplier on the minimum number of sub-estimators needed to cover all classes. Higher values improve accuracy and calibration at the cost of runtime. Default is4.n_estimators— set this to override the auto-derived number of sub-estimators entirely. Leave asNoneto let it be chosen fromalphabet_size, the number of classes in the training data, andn_estimators_redundancy.random_state— controls the randomness of the sub-task encoding, ensuring reproducible results.